egl: check for surface creation failure
This commit is contained in:
parent
7c4ca4e524
commit
bf3e8b4d10
|
@ -72,6 +72,10 @@ impl<N: native::NativeSurface> EGLSurface<N> {
|
||||||
ffi::egl::CreateWindowSurface(**display, config, native.ptr(), surface_attributes.as_ptr())
|
ffi::egl::CreateWindowSurface(**display, config, native.ptr(), surface_attributes.as_ptr())
|
||||||
})?;
|
})?;
|
||||||
|
|
||||||
|
if surface == ffi::egl::NO_SURFACE {
|
||||||
|
return Err(EGLError::BadSurface);
|
||||||
|
}
|
||||||
|
|
||||||
Ok(EGLSurface {
|
Ok(EGLSurface {
|
||||||
display,
|
display,
|
||||||
native,
|
native,
|
||||||
|
|
Loading…
Reference in New Issue