aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/eu
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/eu')
-rw-r--r--src/main/java/eu/siacs/conversations/ui/StartConversationActivity.java10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/main/java/eu/siacs/conversations/ui/StartConversationActivity.java b/src/main/java/eu/siacs/conversations/ui/StartConversationActivity.java
index 7863ff94..68e77af4 100644
--- a/src/main/java/eu/siacs/conversations/ui/StartConversationActivity.java
+++ b/src/main/java/eu/siacs/conversations/ui/StartConversationActivity.java
@@ -42,6 +42,7 @@ import android.widget.Checkable;
import android.widget.EditText;
import android.widget.ListView;
import android.widget.Spinner;
+import android.widget.Toast;
import com.google.zxing.integration.android.IntentIntegrator;
import com.google.zxing.integration.android.IntentResult;
@@ -263,9 +264,12 @@ public class StartConversationActivity extends XmppActivity implements OnRosterU
protected void openConversationForBookmark(int position) {
Bookmark bookmark = (Bookmark) conferences.get(position);
- Conversation conversation = xmppConnectionService
- .findOrCreateConversation(bookmark.getAccount(),
- bookmark.getJid(), true);
+ Jid jid = bookmark.getJid();
+ if (jid == null) {
+ Toast.makeText(this,R.string.invalid_jid,Toast.LENGTH_SHORT).show();
+ return;
+ }
+ Conversation conversation = xmppConnectionService.findOrCreateConversation(bookmark.getAccount(),jid, true);
conversation.setBookmark(bookmark);
if (!conversation.getMucOptions().online()) {
xmppConnectionService.joinMuc(conversation);