closeFeed: add some null pointer checking
This commit is contained in:
parent
aa0711147c
commit
8906cad106
@ -1031,11 +1031,15 @@ 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);
|
||||||
|
if (cats != null) {
|
||||||
cats.setSelectedCategory(null);
|
cats.setSelectedCategory(null);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
FeedsFragment feeds = (FeedsFragment) getSupportFragmentManager().findFragmentByTag(FRAG_FEEDS);
|
FeedsFragment feeds = (FeedsFragment) getSupportFragmentManager().findFragmentByTag(FRAG_FEEDS);
|
||||||
|
if (feeds != null) {
|
||||||
feeds.setSelectedFeed(null);
|
feeds.setSelectedFeed(null);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
m_activeFeed = null;
|
m_activeFeed = null;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user