diff --git a/OsmAnd/src/net/osmand/plus/wikivoyage/explore/SavedArticlesTabFragment.java b/OsmAnd/src/net/osmand/plus/wikivoyage/explore/SavedArticlesTabFragment.java index 409d98a125..712920d64c 100644 --- a/OsmAnd/src/net/osmand/plus/wikivoyage/explore/SavedArticlesTabFragment.java +++ b/OsmAnd/src/net/osmand/plus/wikivoyage/explore/SavedArticlesTabFragment.java @@ -83,7 +83,7 @@ public class SavedArticlesTabFragment extends BaseOsmAndFragment implements Trav @Override public void savedArticlesUpdated() { - if (adapter != null) { + if (adapter != null && getActivity() != null) { List newItems = getItems(); SavedArticlesDiffCallback diffCallback = new SavedArticlesDiffCallback(adapter.getItems(), newItems); DiffUtil.DiffResult diffRes = DiffUtil.calculateDiff(diffCallback); diff --git a/OsmAnd/src/net/osmand/plus/wikivoyage/explore/WikivoyageExploreActivity.java b/OsmAnd/src/net/osmand/plus/wikivoyage/explore/WikivoyageExploreActivity.java index 2dcea8130a..2a4d49a9bc 100644 --- a/OsmAnd/src/net/osmand/plus/wikivoyage/explore/WikivoyageExploreActivity.java +++ b/OsmAnd/src/net/osmand/plus/wikivoyage/explore/WikivoyageExploreActivity.java @@ -298,7 +298,8 @@ public class WikivoyageExploreActivity extends TabActivity implements DownloadEv private void updateFragments() { ExploreTabFragment exploreTabFragment = getExploreTabFragment(); SavedArticlesTabFragment savedArticlesTabFragment = getSavedArticlesTabFragment(); - if (exploreTabFragment != null && savedArticlesTabFragment != null) { + if (exploreTabFragment != null && savedArticlesTabFragment != null + && exploreTabFragment.isAdded() && savedArticlesTabFragment.isAdded()) { exploreTabFragment.populateData(); savedArticlesTabFragment.savedArticlesUpdated(); updateNeeded = false;