From caf5fcad88e38fb265c5817ac716fbe38757a0ec Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Sun, 13 Jan 2019 22:18:32 +0100 Subject: [PATCH] fixed enabled accounts check in onCreate --- .../services/XmppConnectionService.java | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java index 8f68808c1..55abf5028 100644 --- a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java +++ b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java @@ -2538,12 +2538,15 @@ public class XmppConnectionService extends Service { } private boolean hasEnabledAccounts() { - for (Account account : this.accounts) { - if (account.isEnabled()) { - return true; - } - } - return false; + if (this.accounts == null) { + return false; + } + for (Account account : this.accounts) { + if (account.isEnabled()) { + return true; + } + } + return false; }