forked from enlightenment/efl
ecore-wayland: Check return of input_region create and get our safely
Summary: If wl_region_create fails, then we cannot call wl_region functions on a NULL region. That causes the wayland libraries to abort, so let's add a safety check so that we don't crash. @fix Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
parent
000dbd0b96
commit
4f68955268
|
@ -813,6 +813,12 @@ ecore_wl_window_input_region_set(Ecore_Wl_Window *win, int x, int y, int w, int
|
|||
|
||||
region =
|
||||
wl_compositor_create_region(_ecore_wl_compositor_get());
|
||||
if (!region)
|
||||
{
|
||||
wl_surface_set_input_region(win->surface, NULL);
|
||||
return;
|
||||
}
|
||||
|
||||
wl_region_add(region, x, y, w, h);
|
||||
wl_surface_set_input_region(win->surface, region);
|
||||
wl_region_destroy(region);
|
||||
|
|
Loading…
Reference in New Issue