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() {
|
||||
if (mSurfaceHolder == null)
|
||||
mSurfaceHolder = mSurfaceView!!.holder
|
||||
|
||||
if (activity == null || !mSurfaceHolder!!.surface.isValid)
|
||||
return
|
||||
|
||||
|
|
Loading…
Reference in a new issue