aboutsummaryrefslogtreecommitdiffstats
path: root/src/playstore/java/eu
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel@gultsch.de>2016-02-14 15:36:37 +0100
committerDaniel Gultsch <daniel@gultsch.de>2016-02-14 15:36:37 +0100
commit92a6e956fd90c71091c9d8348804e5f285382f32 (patch)
treefdef5a496692baa252e62df8b7fd16abdf168355 /src/playstore/java/eu
parent300326fba3a63fce546d952ac455758ed2cbeca0 (diff)
be more carefull when checking push availability
Diffstat (limited to 'src/playstore/java/eu')
-rw-r--r--src/playstore/java/eu/siacs/conversations/services/PushManagementService.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/playstore/java/eu/siacs/conversations/services/PushManagementService.java b/src/playstore/java/eu/siacs/conversations/services/PushManagementService.java
index f613fe5b..fbd768cf 100644
--- a/src/playstore/java/eu/siacs/conversations/services/PushManagementService.java
+++ b/src/playstore/java/eu/siacs/conversations/services/PushManagementService.java
@@ -15,6 +15,7 @@ import eu.siacs.conversations.R;
import eu.siacs.conversations.entities.Account;
import eu.siacs.conversations.xml.Element;
import eu.siacs.conversations.xmpp.OnIqPacketReceived;
+import eu.siacs.conversations.xmpp.XmppConnection;
import eu.siacs.conversations.xmpp.forms.Data;
import eu.siacs.conversations.xmpp.jid.InvalidJidException;
import eu.siacs.conversations.xmpp.jid.Jid;
@@ -100,7 +101,8 @@ public class PushManagementService {
public boolean available(Account account) {
- return account.getXmppConnection().getFeatures().push() && playServicesAvailable();
+ final XmppConnection connection = account.getXmppConnection();
+ return connection != null && connection.getFeatures().push() && playServicesAvailable();
}
private boolean playServicesAvailable() {