mirror of
https://github.com/moparisthebest/k-9
synced 2024-11-11 03:55:04 -05:00
Avoid NullPointerException in SubjectComparator
This commit is contained in:
parent
c4799d20f0
commit
ce0308f528
@ -303,6 +303,12 @@ public class MessageListFragment extends SherlockFragment implements OnItemClick
|
||||
String subject1 = cursor1.getString(SUBJECT_COLUMN);
|
||||
String subject2 = cursor2.getString(SUBJECT_COLUMN);
|
||||
|
||||
if (subject1 == null) {
|
||||
return (subject2 == null) ? 0 : -1;
|
||||
} else if (subject2 == null) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
return subject1.compareToIgnoreCase(subject2);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user