From 8906cad106b0bb740358f8ab6bfefc1abeb0a6d6 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Mon, 10 Sep 2012 00:05:19 +0400 Subject: [PATCH] closeFeed: add some null pointer checking --- src/org/fox/ttrss/MainActivity.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/org/fox/ttrss/MainActivity.java b/src/org/fox/ttrss/MainActivity.java index 5d4dece5..1ac736e2 100644 --- a/src/org/fox/ttrss/MainActivity.java +++ b/src/org/fox/ttrss/MainActivity.java @@ -1031,10 +1031,14 @@ public class MainActivity extends CommonActivity implements OnlineServices { if (m_activeFeed.is_cat) { FeedCategoriesFragment cats = (FeedCategoriesFragment) getSupportFragmentManager().findFragmentByTag(FRAG_CATS); - cats.setSelectedCategory(null); + if (cats != null) { + cats.setSelectedCategory(null); + } } else { FeedsFragment feeds = (FeedsFragment) getSupportFragmentManager().findFragmentByTag(FRAG_FEEDS); - feeds.setSelectedFeed(null); + if (feeds != null) { + feeds.setSelectedFeed(null); + } } m_activeFeed = null;