fixed npe

This commit is contained in:
iNPUTmice 2014-08-29 12:14:10 +02:00
parent 9be78cbbbe
commit b0d777d9ca
1 changed files with 4 additions and 0 deletions

View File

@ -340,6 +340,10 @@ public class StartConversationActivity extends XmppActivity {
String contactJid = jid.getText().toString(); String contactJid = jid.getText().toString();
Account account = xmppConnectionService Account account = xmppConnectionService
.findAccountByJid(accountJid); .findAccountByJid(accountJid);
if (account==null) {
dialog.dismiss();
return;
}
Contact contact = account.getRoster().getContact( Contact contact = account.getRoster().getContact(
contactJid); contactJid);
if (contact.showInRoster()) { if (contact.showInRoster()) {