Check that Wayland subsurface creation succeeded

It seems that the check for m_surface added in 952de605f6 (Handle
map/unmap events on Wayland's wxGLCanvasEGL, 2023-08-25) was a
copy-paste error and we actually need to check m_wlSubsurface here.
This commit is contained in:
Vadim Zeitlin 2023-09-25 00:43:58 +02:00
parent d128afe1e8
commit 8654766fed

View file

@ -577,17 +577,13 @@ void wxGLCanvasEGL::CreateWaylandSubsurface()
m_wlSubsurface = wl_subcompositor_get_subsurface(m_wlSubcompositor,
m_wlSurface,
surface);
wxCHECK_RET( m_wlSubsurface, "Unable to get EGL subsurface" );
wl_subsurface_set_desync(m_wlSubsurface);
wxEGLUpdatePosition(this);
m_wlFrameCallbackHandler = wl_surface_frame(surface);
wl_callback_add_listener(m_wlFrameCallbackHandler,
&wl_frame_listener, this);
if ( m_surface == EGL_NO_SURFACE )
{
wxFAIL_MSG("Unable to create EGL surface");
return;
}
#endif
}