forked from enlightenment/efl
ecore-wayland: Add safety check for window surface creation
Summary: We cannot call wl_proxy_get_id if the surface creation failed else that would lead to an abort in the wayland libraries. This commit adds a safety check @fix Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
parent
5244ad1f8d
commit
728833ed43
|
@ -269,6 +269,7 @@ ecore_wl_window_surface_create(Ecore_Wl_Window *win)
|
|||
if (!win) return NULL;
|
||||
if (win->surface) return win->surface;
|
||||
win->surface = wl_compositor_create_surface(_ecore_wl_compositor_get());
|
||||
if (!win->surface) return NULL;
|
||||
win->surface_id = wl_proxy_get_id((struct wl_proxy *)win->surface);
|
||||
return win->surface;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue