From 67cab3ce8672f9da0cdff61551e6de12eacf7de3 Mon Sep 17 00:00:00 2001 From: Moxie Marlinspike Date: Sun, 29 Jan 2017 13:02:59 -0800 Subject: [PATCH] Fix illegalargumentexception on rotate Fixes #6118 // FREEBIE --- src/org/thoughtcrime/securesms/ConversationAdapter.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/org/thoughtcrime/securesms/ConversationAdapter.java b/src/org/thoughtcrime/securesms/ConversationAdapter.java index 9fdc14dad3..d68ecc17a0 100644 --- a/src/org/thoughtcrime/securesms/ConversationAdapter.java +++ b/src/org/thoughtcrime/securesms/ConversationAdapter.java @@ -292,6 +292,7 @@ public class ConversationAdapter if (isHeaderPosition(position)) return -1; if (isFooterPosition(position)) return -1; if (position >= getItemCount()) return -1; + if (position < 0) return -1; Cursor cursor = getCursorAtPositionOrThrow(position); MessageRecord record = getMessageRecord(cursor);