From 9d7834f294a362ce7f47f9791526d384c7b1bfdf Mon Sep 17 00:00:00 2001 From: tibbi Date: Fri, 26 May 2017 09:38:35 +0200 Subject: [PATCH] add an aditional null check at videofragments --- .../com/simplemobiletools/gallery/fragments/VideoFragment.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/VideoFragment.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/VideoFragment.kt index 6f7acd6d9..09875dfe7 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/VideoFragment.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/VideoFragment.kt @@ -289,7 +289,7 @@ class VideoFragment : ViewPagerFragment(), SurfaceHolder.Callback, SeekBar.OnSee } override fun surfaceChanged(holder: SurfaceHolder, format: Int, width: Int, height: Int) { - if (width != 0 && height != 0) + if (width != 0 && height != 0 && mSurfaceView != null) setVideoSize() }