1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-12-25 00:58:50 -05:00

Avoid NullPointerException in SubjectComparator

This commit is contained in:
cketti 2013-03-31 00:48:01 +01:00
parent c4799d20f0
commit ce0308f528

View File

@ -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);
}
}