fixed rare npe
This commit is contained in:
parent
4fdc6b2eac
commit
c18e986a93
|
@ -160,9 +160,13 @@ public class Account extends AbstractEntity {
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean hasErrorStatus() {
|
public boolean hasErrorStatus() {
|
||||||
|
if (getXmppConnection() == null) {
|
||||||
|
return false;
|
||||||
|
} else {
|
||||||
return getStatus() > STATUS_NO_INTERNET
|
return getStatus() > STATUS_NO_INTERNET
|
||||||
&& (getXmppConnection().getAttempt() >= 2);
|
&& (getXmppConnection().getAttempt() >= 2);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void setResource(String resource) {
|
public void setResource(String resource) {
|
||||||
this.resource = resource;
|
this.resource = resource;
|
||||||
|
|
Loading…
Reference in a new issue