Fix illegalargumentexception on rotate

Fixes #6118
// FREEBIE
This commit is contained in:
Moxie Marlinspike 2017-01-29 13:02:59 -08:00
parent 3be55e36d9
commit 67cab3ce86

View File

@ -292,6 +292,7 @@ public class ConversationAdapter <V extends View & BindableConversationItem>
if (isHeaderPosition(position)) return -1; if (isHeaderPosition(position)) return -1;
if (isFooterPosition(position)) return -1; if (isFooterPosition(position)) return -1;
if (position >= getItemCount()) return -1; if (position >= getItemCount()) return -1;
if (position < 0) return -1;
Cursor cursor = getCursorAtPositionOrThrow(position); Cursor cursor = getCursorAtPositionOrThrow(position);
MessageRecord record = getMessageRecord(cursor); MessageRecord record = getMessageRecord(cursor);