closeFeed: add some null pointer checking

This commit is contained in:
Andrew Dolgov 2012-09-10 00:05:19 +04:00
parent aa0711147c
commit 8906cad106

View File

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