mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-30 08:18:00 +01:00
add a null check to surfaceholder
This commit is contained in:
parent
dccca19844
commit
9e4d53684a
1 changed files with 3 additions and 0 deletions
|
@ -297,6 +297,9 @@ class VideoFragment : ViewPagerFragment(), SurfaceHolder.Callback, SeekBar.OnSee
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun setVideoSize() {
|
private fun setVideoSize() {
|
||||||
|
if (mSurfaceHolder == null)
|
||||||
|
mSurfaceHolder = mSurfaceView!!.holder
|
||||||
|
|
||||||
if (activity == null || !mSurfaceHolder!!.surface.isValid)
|
if (activity == null || !mSurfaceHolder!!.surface.isValid)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue