add an additional null check at surfaceholder of video fragment
This commit is contained in:
parent
f4ddc12911
commit
d2713635d5
1 changed files with 1 additions and 1 deletions
|
@ -302,7 +302,7 @@ class VideoFragment : ViewPagerFragment(), SurfaceHolder.Callback, SeekBar.OnSee
|
|||
if (mSurfaceHolder == null)
|
||||
mSurfaceHolder = mSurfaceView!!.holder
|
||||
|
||||
if (activity == null || !mSurfaceHolder!!.surface.isValid)
|
||||
if (activity == null || mSurfaceHolder == null || !mSurfaceHolder!!.surface.isValid)
|
||||
return
|
||||
|
||||
initMediaPlayer()
|
||||
|
|
Loading…
Reference in a new issue