Avoid NullPointerException
This commit is contained in:
parent
0ba4bf6973
commit
9d7eae252e
1 changed files with 4 additions and 1 deletions
|
@ -3041,7 +3041,10 @@ public class MessageListFragment extends SherlockFragment implements OnItemClick
|
|||
long uniqueId = cursor.getLong(mUniqueIdColumn);
|
||||
|
||||
if (mSelected.contains(uniqueId)) {
|
||||
messages.add(getMessageAtPosition(position));
|
||||
Message message = getMessageAtPosition(position);
|
||||
if (message != null) {
|
||||
messages.add(message);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue