aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel@gultsch.de>2015-09-17 14:02:28 +0200
committerDaniel Gultsch <daniel@gultsch.de>2015-09-17 14:02:28 +0200
commit07c7f5bc086de3f99396a773371e76cbbb2901e0 (patch)
treecdbbcdff102c26621519f36ccf5d2c54f80a03b6 /src/main/java
parent7e712d9d4cdd7fb8aa6c7ef68ce2d5c39ff1c257 (diff)
catch IndexOutOfBoundsException when swiping away conversations
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/eu/siacs/conversations/ui/ConversationActivity.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/main/java/eu/siacs/conversations/ui/ConversationActivity.java b/src/main/java/eu/siacs/conversations/ui/ConversationActivity.java
index 913190b4..48045a64 100644
--- a/src/main/java/eu/siacs/conversations/ui/ConversationActivity.java
+++ b/src/main/java/eu/siacs/conversations/ui/ConversationActivity.java
@@ -210,7 +210,11 @@ public class ConversationActivity extends XmppActivity
View v = listView.getChildAt(0);
final int top = (v == null) ? 0 : (v.getTop() - listView.getPaddingTop());
- swipedConversation = listAdapter.getItem(position);
+ try {
+ swipedConversation = listAdapter.getItem(position);
+ } catch (IndexOutOfBoundsException e) {
+ return null;
+ }
listAdapter.remove(swipedConversation);
swipedConversation.markRead();
xmppConnectionService.getNotificationService().clear(swipedConversation);