check if m_adapter is not null in setselectedfeed/cat

This commit is contained in:
Andrew Dolgov 2013-10-24 15:04:51 +04:00
parent 4efd6a5511
commit 3fa0b2591a
2 changed files with 9 additions and 3 deletions

View File

@ -511,7 +511,10 @@ public class FeedCategoriesFragment extends Fragment implements OnItemClickListe
public void setSelectedCategory(FeedCategory cat) {
m_selectedCat = cat;
m_adapter.notifyDataSetChanged();
if (m_adapter != null) {
m_adapter.notifyDataSetChanged();
}
}
public FeedCategory getSelectedCategory() {

View File

@ -743,7 +743,10 @@ public class FeedsFragment extends Fragment implements OnItemClickListener, OnSh
public void setSelectedFeed(Feed feed) {
m_selectedFeed = feed;
m_adapter.notifyDataSetChanged();
if (m_adapter != null) {
m_adapter.notifyDataSetChanged();
}
}
@Override