Change summary
src/main/java/eu/siacs/conversations/services/XmppConnectionService.java | 15
1 file changed, 9 insertions(+), 6 deletions(-)
Detailed changes
@@ -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;
}