fixing some crash at the video fragment cleanup

This commit is contained in:
tibbi
2019-01-12 13:32:07 +01:00
parent 3b849ec3b2
commit 34cfebf115
2 changed files with 7 additions and 4 deletions

View File

@ -635,10 +635,13 @@ class VideoFragment : ViewPagerFragment(), TextureView.SurfaceTextureListener, S
private fun cleanup() {
pauseVideo()
mCurrTimeView.text = 0.getFormattedDuration()
releaseExoPlayer()
mSeekBar.progress = 0
mTimerHandler.removeCallbacksAndMessages(null)
if (mWasFragmentInit) {
mCurrTimeView.text = 0.getFormattedDuration()
mSeekBar.progress = 0
mTimerHandler.removeCallbacksAndMessages(null)
}
}
private fun releaseExoPlayer() {