Browse Source

pager: check if bundle is not null in saveState()

Andrew Dolgov 1 year ago
parent
commit
e623e87078

+ 4 - 1
org.fox.ttrss/src/main/java/org/fox/ttrss/ArticlePager.java

@@ -58,7 +58,10 @@ public class ArticlePager extends StateSavedFragment {
 		@Override
 		public Parcelable saveState() {
 			Bundle bundle = (Bundle) super.saveState();
-			bundle.putParcelableArray("states", null); // Never maintain any states from the base class, just null it out
+
+			if (bundle != null)
+				bundle.putParcelableArray("states", null); // Never maintain any states from the base class, just null it out
+
 			return bundle;
 		}
 

+ 4 - 1
org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineArticlePager.java

@@ -95,7 +95,10 @@ public class OfflineArticlePager extends Fragment {
 		@Override
 		public Parcelable saveState() {
 			Bundle bundle = (Bundle) super.saveState();
-			bundle.putParcelableArray("states", null); // Never maintain any states from the base class, just null it out
+
+			if (bundle != null)
+				bundle.putParcelableArray("states", null); // Never maintain any states from the base class, just null it out
+
 			return bundle;
 		}