diff --git a/src/org/fox/ttrss/FeedCategoriesFragment.java b/src/org/fox/ttrss/FeedCategoriesFragment.java index 1cf7d4e6..90889255 100644 --- a/src/org/fox/ttrss/FeedCategoriesFragment.java +++ b/src/org/fox/ttrss/FeedCategoriesFragment.java @@ -326,7 +326,11 @@ public class FeedCategoriesFragment extends Fragment implements OnItemClickListe } } - Collections.sort(m_cats, cmp); + try { + Collections.sort(m_cats, cmp); + } catch (IllegalArgumentException e) { + e.printStackTrace(); + } try { m_adapter.notifyDataSetChanged(); } catch (NullPointerException e) { diff --git a/src/org/fox/ttrss/FeedsFragment.java b/src/org/fox/ttrss/FeedsFragment.java index 2f5a4545..24150c68 100644 --- a/src/org/fox/ttrss/FeedsFragment.java +++ b/src/org/fox/ttrss/FeedsFragment.java @@ -542,7 +542,12 @@ public class FeedsFragment extends Fragment implements OnItemClickListener, OnSh } } - Collections.sort(m_feeds, cmp); + try { + Collections.sort(m_feeds, cmp); + } catch (IllegalArgumentException e) { + // sort order got changed in prefs or something + e.printStackTrace(); + } try { m_adapter.notifyDataSetChanged();