aboutsummaryrefslogtreecommitdiffstats
path: root/src/eu/siacs/conversations/entities/Account.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/eu/siacs/conversations/entities/Account.java')
-rw-r--r--src/eu/siacs/conversations/entities/Account.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/eu/siacs/conversations/entities/Account.java b/src/eu/siacs/conversations/entities/Account.java
index eacd172c..9b1cbcab 100644
--- a/src/eu/siacs/conversations/entities/Account.java
+++ b/src/eu/siacs/conversations/entities/Account.java
@@ -160,8 +160,12 @@ public class Account extends AbstractEntity {
}
public boolean hasErrorStatus() {
- return getStatus() > STATUS_NO_INTERNET
- && (getXmppConnection().getAttempt() >= 2);
+ if (getXmppConnection() == null) {
+ return false;
+ } else {
+ return getStatus() > STATUS_NO_INTERNET
+ && (getXmppConnection().getAttempt() >= 2);
+ }
}
public void setResource(String resource) {