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 {