closeFeed: add some null pointer checking
This commit is contained in:
parent
aa0711147c
commit
8906cad106
@ -1031,10 +1031,14 @@ public class MainActivity extends CommonActivity implements OnlineServices {
|
|||||||
|
|
||||||
if (m_activeFeed.is_cat) {
|
if (m_activeFeed.is_cat) {
|
||||||
FeedCategoriesFragment cats = (FeedCategoriesFragment) getSupportFragmentManager().findFragmentByTag(FRAG_CATS);
|
FeedCategoriesFragment cats = (FeedCategoriesFragment) getSupportFragmentManager().findFragmentByTag(FRAG_CATS);
|
||||||
cats.setSelectedCategory(null);
|
if (cats != null) {
|
||||||
|
cats.setSelectedCategory(null);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
FeedsFragment feeds = (FeedsFragment) getSupportFragmentManager().findFragmentByTag(FRAG_FEEDS);
|
FeedsFragment feeds = (FeedsFragment) getSupportFragmentManager().findFragmentByTag(FRAG_FEEDS);
|
||||||
feeds.setSelectedFeed(null);
|
if (feeds != null) {
|
||||||
|
feeds.setSelectedFeed(null);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
m_activeFeed = null;
|
m_activeFeed = null;
|
||||||
|
Loading…
Reference in New Issue
Block a user