mirror of
https://github.com/Ryujinx/Opentk.git
synced 2025-02-02 19:51:10 +00:00
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
|
@ -57,7 +57,7 @@ namespace OpenTK.Platform.Android {
|
||||||
|
|
||||||
public bool HasSurface
|
public bool HasSurface
|
||||||
{
|
{
|
||||||
get { return eglWindowInfo.Surface != IntPtr.Zero; }
|
get { return eglWindowInfo != null && eglWindowInfo.Surface != IntPtr.Zero; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public ISurfaceHolder Holder {
|
public ISurfaceHolder Holder {
|
||||||
|
|
Loading…
Reference in a new issue