From c18e986a93d7a36769b6fdecdcea154c7b3d2024 Mon Sep 17 00:00:00 2001 From: iNPUTmice Date: Tue, 14 Oct 2014 16:25:59 +0200 Subject: fixed rare npe --- src/eu/siacs/conversations/entities/Account.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src') 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) { -- cgit v1.2.3