add check for added fragment
This commit is contained in:
parent
bad6f228a3
commit
76d9bc80b7
1 changed files with 1 additions and 1 deletions
|
@ -83,7 +83,7 @@ public class SavedArticlesTabFragment extends BaseOsmAndFragment implements Trav
|
|||
|
||||
@Override
|
||||
public void savedArticlesUpdated() {
|
||||
if (adapter != null && getActivity() != null) {
|
||||
if (adapter != null && isAdded()) {
|
||||
List<Object> newItems = getItems();
|
||||
SavedArticlesDiffCallback diffCallback = new SavedArticlesDiffCallback(adapter.getItems(), newItems);
|
||||
DiffUtil.DiffResult diffRes = DiffUtil.calculateDiff(diffCallback);
|
||||
|
|
Loading…
Reference in a new issue