From 000dbd0b968df845e886bab7de96800748ff5c72 Mon Sep 17 00:00:00 2001 From: Chris Michael Date: Mon, 1 Dec 2014 13:13:34 -0500 Subject: [PATCH] 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 --- src/lib/ecore_wayland/ecore_wl_window.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/lib/ecore_wayland/ecore_wl_window.c b/src/lib/ecore_wayland/ecore_wl_window.c index 247691eb09..e5935b72aa 100644 --- a/src/lib/ecore_wayland/ecore_wl_window.c +++ b/src/lib/ecore_wayland/ecore_wl_window.c @@ -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) {