diff options
author | iNPUTmice <daniel@gultsch.de> | 2014-08-22 13:22:34 +0200 |
---|---|---|
committer | iNPUTmice <daniel@gultsch.de> | 2014-08-22 13:22:34 +0200 |
commit | 9b0bf9b5bc4ce0e0bf0e390156f2ba4fe9119497 (patch) | |
tree | 653238b85fd52e6f800d83426ea1e82c6a797dba /src | |
parent | c40c8ee91001927f25824dc6766ba8df8f20a163 (diff) |
fixed another npe
Diffstat (limited to 'src')
-rw-r--r-- | src/eu/siacs/conversations/services/XmppConnectionService.java | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/src/eu/siacs/conversations/services/XmppConnectionService.java b/src/eu/siacs/conversations/services/XmppConnectionService.java index a6853f8a..c535f1a3 100644 --- a/src/eu/siacs/conversations/services/XmppConnectionService.java +++ b/src/eu/siacs/conversations/services/XmppConnectionService.java @@ -177,13 +177,16 @@ public class XmppConnectionService extends Service { reconnectAccount(account, true); } else if ((account.getStatus() != Account.STATUS_CONNECTING) && (account.getStatus() != Account.STATUS_NO_INTERNET)) { - int next = account.getXmppConnection().getTimeToNextAttempt(); - Log.d(LOGTAG, account.getJid() - + ": error connecting account. try again in " + next - + "s for the " - + (account.getXmppConnection().getAttempt() + 1) - + " time"); - scheduleWakeupCall((int) (next * 1.2), false); + XmppConnection connection = account.getXmppConnection(); + if (connection!=null) { + int next = connection.getTimeToNextAttempt(); + Log.d(LOGTAG, account.getJid() + + ": error connecting account. try again in " + next + + "s for the " + + (connection.getAttempt() + 1) + + " time"); + scheduleWakeupCall((int) (next * 1.2), false); + } } UIHelper.showErrorNotification(getApplicationContext(), getAccounts()); |