add some isAdded() bullshit to headlines requests

This commit is contained in:
Andrew Dolgov 2015-02-16 15:31:42 +04:00
parent 6756f75858
commit 7a4dc9de3d
2 changed files with 2 additions and 2 deletions

View File

@ -145,7 +145,7 @@ public class ArticlePager extends Fragment {
@Override @Override
protected void onPostExecute(JsonElement result) { protected void onPostExecute(JsonElement result) {
if (isDetached()) return; if (isDetached() || !isAdded()) return;
super.onPostExecute(result); super.onPostExecute(result);

View File

@ -494,7 +494,7 @@ public class HeadlinesFragment extends Fragment implements OnItemClickListener,
@Override @Override
protected void onPostExecute(JsonElement result) { protected void onPostExecute(JsonElement result) {
if (isDetached()) return; if (isDetached() || !isAdded()) return;
if (getView() != null) { if (getView() != null) {
ListView list = (ListView)getView().findViewById(R.id.headlines_list); ListView list = (ListView)getView().findViewById(R.id.headlines_list);