diff --git a/src/com/fsck/k9/fragment/MessageListFragment.java b/src/com/fsck/k9/fragment/MessageListFragment.java index f0f5058ea..2a0c67b9c 100644 --- a/src/com/fsck/k9/fragment/MessageListFragment.java +++ b/src/com/fsck/k9/fragment/MessageListFragment.java @@ -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); } }