mirror of
https://github.com/SimpleMobileTools/Simple-Gallery.git
synced 2025-06-05 21:59:19 +02:00
add a mediaplayer nullcheck
This commit is contained in:
@ -289,6 +289,9 @@ class VideoFragment : ViewPagerFragment(), View.OnClickListener, SurfaceHolder.C
|
||||
if (activity == null)
|
||||
return
|
||||
|
||||
if (mMediaPlayer == null)
|
||||
initMediaPlayer()
|
||||
|
||||
val videoProportion = mMediaPlayer!!.videoWidth.toFloat() / mMediaPlayer!!.videoHeight.toFloat()
|
||||
val display = activity.windowManager.defaultDisplay
|
||||
val screenWidth: Int
|
||||
|
Reference in New Issue
Block a user