ecore-wayland: If we fail to create a new opaque region, safely exit

the function.

Summary: If the compositor fails to create a new opaque region, then
we cannot call wl_region functions on a NULL region. This leads to an
abort in the wayland libraries, so let's trap the return of
wl_region_create and exit safely

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
Chris Michael 2014-12-01 13:13:34 -05:00
parent c1eb5de916
commit 000dbd0b96
1 changed files with 5 additions and 0 deletions

View File

@ -849,6 +849,11 @@ ecore_wl_window_opaque_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_opaque_region(win->surface, NULL);
return;
}
switch (win->rotation)
{