diff options
author | daniel oeh <daniel.oeh@gmail.com> | 2014-08-12 16:46:01 +0200 |
---|---|---|
committer | daniel oeh <daniel.oeh@gmail.com> | 2014-08-12 16:46:01 +0200 |
commit | cf1e9cb59b05ab35523467b208d99a3cae97e9fd (patch) | |
tree | 9d1e69b5f0142542ffc2ad1f8e9f573f114cefd4 /src | |
parent | 57c70871b6c9b68e5c82b0b3472102c4f8ccb2ea (diff) | |
download | AntennaPod-cf1e9cb59b05ab35523467b208d99a3cae97e9fd.zip |
Fixed NullpointerException in TagListFragment
Diffstat (limited to 'src')
-rw-r--r-- | src/de/danoeh/antennapod/fragment/gpodnet/TagListFragment.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/de/danoeh/antennapod/fragment/gpodnet/TagListFragment.java b/src/de/danoeh/antennapod/fragment/gpodnet/TagListFragment.java index 2289862aa..a7e1033df 100644 --- a/src/de/danoeh/antennapod/fragment/gpodnet/TagListFragment.java +++ b/src/de/danoeh/antennapod/fragment/gpodnet/TagListFragment.java @@ -1,5 +1,6 @@ package de.danoeh.antennapod.fragment.gpodnet; +import android.app.Activity; import android.content.Context; import android.os.AsyncTask; import android.os.Bundle; @@ -43,8 +44,11 @@ public class TagListFragment extends ListFragment { sv.setOnQueryTextListener(new SearchView.OnQueryTextListener() { @Override public boolean onQueryTextSubmit(String s) { - sv.clearFocus(); - ((MainActivity) getActivity()).loadChildFragment(SearchListFragment.newInstance(s)); + Activity activity = getActivity(); + if (activity != null) { + sv.clearFocus(); + ((MainActivity) activity).loadChildFragment(SearchListFragment.newInstance(s)); + } return true; } |