mirror of
https://github.com/SimpleMobileTools/Simple-Gallery.git
synced 2025-06-05 21:59:19 +02:00
add a null check at video fastforwarding
This commit is contained in:
@@ -471,6 +471,10 @@ class VideoFragment : ViewPagerFragment(), SurfaceHolder.Callback, SeekBar.OnSee
|
||||
}
|
||||
|
||||
private fun skip(forward: Boolean) {
|
||||
if (mMediaPlayer == null) {
|
||||
return
|
||||
}
|
||||
|
||||
val curr = mMediaPlayer!!.currentPosition
|
||||
val twoPercents = mMediaPlayer!!.duration / 50
|
||||
val newProgress = if (forward) curr + twoPercents else curr - twoPercents
|
||||
|
Reference in New Issue
Block a user