From 7a4dc9de3d33939dda61a0b45ce0a21347bedfcb Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Mon, 16 Feb 2015 15:31:42 +0400 Subject: [PATCH] add some isAdded() bullshit to headlines requests --- org.fox.ttrss/src/main/java/org/fox/ttrss/ArticlePager.java | 2 +- .../src/main/java/org/fox/ttrss/HeadlinesFragment.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/org.fox.ttrss/src/main/java/org/fox/ttrss/ArticlePager.java b/org.fox.ttrss/src/main/java/org/fox/ttrss/ArticlePager.java index 00d0e536..6a394078 100755 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/ArticlePager.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/ArticlePager.java @@ -145,7 +145,7 @@ public class ArticlePager extends Fragment { @Override protected void onPostExecute(JsonElement result) { - if (isDetached()) return; + if (isDetached() || !isAdded()) return; super.onPostExecute(result); diff --git a/org.fox.ttrss/src/main/java/org/fox/ttrss/HeadlinesFragment.java b/org.fox.ttrss/src/main/java/org/fox/ttrss/HeadlinesFragment.java index 14f0f1ff..3cb69c7f 100755 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/HeadlinesFragment.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/HeadlinesFragment.java @@ -494,7 +494,7 @@ public class HeadlinesFragment extends Fragment implements OnItemClickListener, @Override protected void onPostExecute(JsonElement result) { - if (isDetached()) return; + if (isDetached() || !isAdded()) return; if (getView() != null) { ListView list = (ListView)getView().findViewById(R.id.headlines_list);