From a93e2cdc3019c05284326b4f45d7bd32b8dbf22e Mon Sep 17 00:00:00 2001 From: Mauricio Colli Date: Tue, 8 Oct 2019 23:59:11 -0300 Subject: [PATCH] Quick fix for NPE when exiting the feed fragment --- .../java/org/schabi/newpipe/local/feed/FeedFragment.kt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/org/schabi/newpipe/local/feed/FeedFragment.kt b/app/src/main/java/org/schabi/newpipe/local/feed/FeedFragment.kt index 64e4f2699..d8e7dc7b1 100644 --- a/app/src/main/java/org/schabi/newpipe/local/feed/FeedFragment.kt +++ b/app/src/main/java/org/schabi/newpipe/local/feed/FeedFragment.kt @@ -111,7 +111,12 @@ class FeedFragment : BaseListFragment() { override fun onDestroyOptionsMenu() { super.onDestroyOptionsMenu() - activity.supportActionBar?.subtitle = null + activity?.supportActionBar?.subtitle = null + } + + override fun onDestroy() { + super.onDestroy() + activity?.supportActionBar?.subtitle = null } ///////////////////////////////////////////////////////////////////////////