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()