From d5c7a5a8ca3827920dc188496abdddadadaa0564 Mon Sep 17 00:00:00 2001 From: tibbi Date: Sun, 13 May 2018 21:17:22 +0200 Subject: [PATCH] make bundle nullable at saving state --- .../com/simplemobiletools/gallery/adapters/MyPagerAdapter.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/adapters/MyPagerAdapter.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/adapters/MyPagerAdapter.kt index 2068a7c55..d4f3d0be1 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/adapters/MyPagerAdapter.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/adapters/MyPagerAdapter.kt @@ -57,7 +57,7 @@ class MyPagerAdapter(val activity: ViewPagerActivity, fm: FragmentManager, val m // try fixing TransactionTooLargeException crash on Android Nougat, tip from https://stackoverflow.com/a/43193425/1967672 override fun saveState(): Parcelable? { val bundle = super.saveState() as Bundle? - bundle!!.putParcelableArray("states", null) + bundle?.putParcelableArray("states", null) return bundle } }