From 2196d1f4f9ad173a0078cf709667b52c307429f9 Mon Sep 17 00:00:00 2001 From: tibbi Date: Sat, 3 Aug 2019 09:25:42 +0200 Subject: [PATCH] adding a crashfix --- .../simplemobiletools/gallery/pro/fragments/VideoFragment.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/fragments/VideoFragment.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/fragments/VideoFragment.kt index b3a59e080..df260c293 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/fragments/VideoFragment.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/fragments/VideoFragment.kt @@ -273,7 +273,7 @@ class VideoFragment : ViewPagerFragment(), TextureView.SurfaceTextureListener, S } private fun saveVideoProgress() { - if (!videoEnded()) { + if (!videoEnded() && mExoPlayer != null) { mConfig.saveLastVideoPosition(mMedium.path, mExoPlayer!!.currentPosition.toInt() / 1000) } }