fixing a crash at uninitialized variable at PhotoFragment

This commit is contained in:
tibbi 2019-06-10 23:57:45 +02:00
parent 402eb61f79
commit 323d9f999d

View file

@ -251,6 +251,10 @@ class PhotoFragment : ViewPagerFragment() {
override fun onConfigurationChanged(newConfig: Configuration) { override fun onConfigurationChanged(newConfig: Configuration) {
super.onConfigurationChanged(newConfig) super.onConfigurationChanged(newConfig)
if (!mWasInit) {
return
}
// avoid GIFs being skewed, played in wrong aspect ratio // avoid GIFs being skewed, played in wrong aspect ratio
if (mMedium.isGIF()) { if (mMedium.isGIF()) {
mView.onGlobalLayout { mView.onGlobalLayout {