test if we really have a connection (we won't have one if the auth failed)
authorNikita Kozlov <nikita@elyzion.net>
Wed, 22 Feb 2012 18:55:21 +0100
changeset 936 5cfaa17be49e
parent 935 5801f1f5f0bd
child 937 e0e5ea20e1c5
test if we really have a connection (we won't have one if the auth failed)
src/com/beem/project/beem/BeemService.java
--- a/src/com/beem/project/beem/BeemService.java	Wed Feb 22 00:29:10 2012 +0100
+++ b/src/com/beem/project/beem/BeemService.java	Wed Feb 22 18:55:21 2012 +0100
@@ -527,7 +527,9 @@
 			handleDisconnect(accountName);
 		    } else {
 			handleConnect(accountName);
-			mConnection.get(accountName).changeStatus(status, "");
+			if (mConnection.containsKey(accountName)) {
+			   mConnection.get(accountName).changeStatus(status, "");
+			}
 		    }
 		    break;
 		case MESSAGE_MUC_JOIN: