From 323d9f999df5ea96cf7f5870cf07e78155a28254 Mon Sep 17 00:00:00 2001 From: tibbi Date: Mon, 10 Jun 2019 23:57:45 +0200 Subject: [PATCH] fixing a crash at uninitialized variable at PhotoFragment --- .../simplemobiletools/gallery/pro/fragments/PhotoFragment.kt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/fragments/PhotoFragment.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/fragments/PhotoFragment.kt index 370edeab5..71c78ff0c 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/fragments/PhotoFragment.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/fragments/PhotoFragment.kt @@ -251,6 +251,10 @@ class PhotoFragment : ViewPagerFragment() { override fun onConfigurationChanged(newConfig: Configuration) { super.onConfigurationChanged(newConfig) + if (!mWasInit) { + return + } + // avoid GIFs being skewed, played in wrong aspect ratio if (mMedium.isGIF()) { mView.onGlobalLayout {