From d2713635d5c01d14305630736d7ba0a44f2402ec Mon Sep 17 00:00:00 2001 From: tibbi Date: Wed, 31 May 2017 23:20:34 +0200 Subject: [PATCH] add an additional null check at surfaceholder of video fragment --- .../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 3f894e8e8..5359bcc67 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/VideoFragment.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/VideoFragment.kt @@ -302,7 +302,7 @@ class VideoFragment : ViewPagerFragment(), SurfaceHolder.Callback, SeekBar.OnSee if (mSurfaceHolder == null) mSurfaceHolder = mSurfaceView!!.holder - if (activity == null || !mSurfaceHolder!!.surface.isValid) + if (activity == null || mSurfaceHolder == null || !mSurfaceHolder!!.surface.isValid) return initMediaPlayer()