diff options
author | tntabaka <get@trevortabaka.info> | 2021-03-07 11:43:10 -0500 |
---|---|---|
committer | tntabaka <get@trevortabaka.info> | 2021-03-07 14:38:39 -0500 |
commit | e85fab3b305aeae74bbabeade7a13e3ad444efad (patch) | |
tree | e9b95f8454a3451788f37ddb6b8ae28da6c3eab2 | |
parent | 14c81265dcfcd2107a8c79172ca6506ddc75f803 (diff) | |
download | AntennaPod-e85fab3b305aeae74bbabeade7a13e3ad444efad.zip |
Fix crash when selecting gpodder.net category
Stack trace:
java.lang.NullPointerException: Attempt to invoke virtual method 'void androidx.appcompat.app.ActionBar.setTitle(java.lang.CharSequence)' on a null object reference
at de.danoeh.antennapod.fragment.gpodnet.TagFragment.onActivityCreated(TagFragment.java:49)
at androidx.fragment.app.Fragment.performActivityCreated(Fragment.java:2717)
at androidx.fragment.app.FragmentStateManager.activityCreated(FragmentStateManager.java:346)
at androidx.fragment.app.FragmentManager.moveToState(FragmentManager.java:1188)
at androidx.fragment.app.FragmentManager.moveToState(FragmentManager.java:1356)
at androidx.fragment.app.FragmentManager.moveFragmentToExpectedState(FragmentManager.java:1434)
at androidx.fragment.app.FragmentManager.moveToState(FragmentManager.java:1497)
at androidx.fragment.app.BackStackRecord.executeOps(BackStackRecord.java:447)
at androidx.fragment.app.FragmentManager.executeOps(FragmentManager.java:2169)
at androidx.fragment.app.FragmentManager.executeOpsTogether(FragmentManager.java:1992)
at androidx.fragment.app.FragmentManager.removeRedundantOperationsAndExecute(FragmentManager.java:1947)
at androidx.fragment.app.FragmentManager.execPendingActions(FragmentManager.java:1849)
at androidx.fragment.app.FragmentManager$4.run(FragmentManager.java:413)
at android.os.Handler.handleCallback(Handler.java:873)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:7073)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:494)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:964)
-rw-r--r-- | app/src/main/java/de/danoeh/antennapod/fragment/gpodnet/TagFragment.java | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/app/src/main/java/de/danoeh/antennapod/fragment/gpodnet/TagFragment.java b/app/src/main/java/de/danoeh/antennapod/fragment/gpodnet/TagFragment.java index 0ce38656a..b60f1bed2 100644 --- a/app/src/main/java/de/danoeh/antennapod/fragment/gpodnet/TagFragment.java +++ b/app/src/main/java/de/danoeh/antennapod/fragment/gpodnet/TagFragment.java @@ -1,17 +1,15 @@ package de.danoeh.antennapod.fragment.gpodnet; import android.os.Bundle; -import androidx.annotation.Nullable; + +import org.apache.commons.lang3.Validate; + +import java.util.List; import de.danoeh.antennapod.core.sync.gpoddernet.GpodnetService; import de.danoeh.antennapod.core.sync.gpoddernet.GpodnetServiceException; import de.danoeh.antennapod.core.sync.gpoddernet.model.GpodnetPodcast; import de.danoeh.antennapod.core.sync.gpoddernet.model.GpodnetTag; -import org.apache.commons.lang3.Validate; - -import de.danoeh.antennapod.activity.MainActivity; - -import java.util.List; /** * Shows all podcasts from gpodder.net that belong to a specific tag. @@ -43,12 +41,6 @@ public class TagFragment extends PodcastListFragment { } @Override - public void onActivityCreated(@Nullable Bundle savedInstanceState) { - super.onActivityCreated(savedInstanceState); - ((MainActivity) getActivity()).getSupportActionBar().setTitle(tag.getTitle()); - } - - @Override protected List<GpodnetPodcast> loadPodcastData(GpodnetService service) throws GpodnetServiceException { return service.getPodcastsForTag(tag, PODCAST_COUNT); } |