diff options
author | iNPUTmice <daniel@gultsch.de> | 2014-10-14 16:25:59 +0200 |
---|---|---|
committer | iNPUTmice <daniel@gultsch.de> | 2014-10-14 16:25:59 +0200 |
commit | c18e986a93d7a36769b6fdecdcea154c7b3d2024 (patch) | |
tree | 91f8ef44521fc44c9adef53d532db9fb2e7343b8 /src | |
parent | 4fdc6b2eac103183f452269ec028bc44b3dce6f6 (diff) |
fixed rare npe
Diffstat (limited to 'src')
-rw-r--r-- | src/eu/siacs/conversations/entities/Account.java | 8 |
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) { |