2
0
Fork 1
mirror of https://github.com/FossifyOrg/Gallery.git synced 2025-04-11 05:57:38 +02:00

add a mediaplayer nullcheck

This commit is contained in:
tibbi 2016-12-11 22:50:05 +01:00
parent 33af23878a
commit 0011f41cdb

View file

@ -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