From 5d2528b415e5011ba07753d5b2cd8682449b2b63 Mon Sep 17 00:00:00 2001 From: tibbi Date: Thu, 15 Jun 2017 21:35:08 +0200 Subject: [PATCH] check for null mediaplayer at dragging video progress --- .../com/simplemobiletools/gallery/fragments/VideoFragment.kt | 3 +++ 1 file changed, 3 insertions(+) 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 5359bcc67..2563061d1 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/VideoFragment.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/VideoFragment.kt @@ -348,6 +348,9 @@ class VideoFragment : ViewPagerFragment(), SurfaceHolder.Callback, SeekBar.OnSee override fun onStartTrackingTouch(seekBar: SeekBar) { initMediaPlayer() + if (mMediaPlayer == null) + return + mMediaPlayer!!.pause() mIsDragged = true }