aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2018-11-21 20:17:43 +0100
committerChristian Schneppe <christian@pix-art.de>2018-11-21 20:17:43 +0100
commitd1098d8bfb635b231085d019cfd2349be264bbf9 (patch)
treee79fd7ef05368cb23c55b82154e9f046c0bd27a0 /src/main/java
parent5707ce01b07e526ed3df18b1a98373f69e9f98a6 (diff)
fix crash with xmpp uris
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/de/pixart/messenger/ui/adapter/MessageAdapter.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/adapter/MessageAdapter.java b/src/main/java/de/pixart/messenger/ui/adapter/MessageAdapter.java
index 8ba2587b5..42a0bc81b 100644
--- a/src/main/java/de/pixart/messenger/ui/adapter/MessageAdapter.java
+++ b/src/main/java/de/pixart/messenger/ui/adapter/MessageAdapter.java
@@ -413,7 +413,12 @@ public class MessageAdapter extends ArrayAdapter<Message> implements CopyTextVie
private void displayXmppMessage(final ViewHolder viewHolder, final String body) {
String contact = body.toLowerCase();
contact = contact.split(":")[1];
- boolean group = (contact.split("\\?")[1]) != null && (contact.split("\\?")[1]).length() > 0 && (contact.split("\\?")[1]).equalsIgnoreCase("join");
+ boolean group;
+ try {
+ group = ((contact.split("\\?")[1]) != null && (contact.split("\\?")[1]).length() > 0 && (contact.split("\\?")[1]).equalsIgnoreCase("join"));
+ } catch (Exception e) {
+ group = false;
+ }
contact = contact.split("\\?")[0];
String add_contact = activity.getString(R.string.add_to_contact_list) + " (" + contact + ")";
viewHolder.audioPlayer.setVisibility(View.GONE);