mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-02-21 10:17:56 +00:00
Fix possible NPE in ConversationListAdapter.
This commit is contained in:
@@ -175,6 +175,10 @@ class ConversationListAdapter extends ListAdapter<Conversation, RecyclerView.Vie
|
||||
public long getItemId(int position) {
|
||||
Conversation item = getItem(position);
|
||||
|
||||
if (item == null) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
switch (item.getType()) {
|
||||
case THREAD: return item.getThreadRecord().getThreadId();
|
||||
case PINNED_HEADER: return -1;
|
||||
|
||||
Reference in New Issue
Block a user