Android- Fix crash when querying for surface when window info was not created yet
HasSurface is called by ReadyToRender property to query if the surface was created, but it’s possible that the window info was not created yet, added a missing null check.
This commit is contained in:
parent
1581ac7b8a
commit
57ceff19b9
1 changed files with 1 additions and 1 deletions
|
@ -57,7 +57,7 @@ namespace OpenTK.Platform.Android {
|
|||
|
||||
public bool HasSurface
|
||||
{
|
||||
get { return eglWindowInfo.Surface != IntPtr.Zero; }
|
||||
get { return eglWindowInfo != null && eglWindowInfo.Surface != IntPtr.Zero; }
|
||||
}
|
||||
|
||||
public ISurfaceHolder Holder {
|
||||
|
|
Loading…
Reference in a new issue