summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Michael <cp.michael@samsung.com>2014-12-01 13:13:34 -0500
committerChris Michael <cp.michael@samsung.com>2014-12-01 13:13:34 -0500
commit000dbd0b968df845e886bab7de96800748ff5c72 (patch)
tree9e90c974f8f94cf23a87508e3772b13fcf86c96e
parentc1eb5de916d57587b8bb51e2c2340f95f8b42f02 (diff)
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>
-rw-r--r--src/lib/ecore_wayland/ecore_wl_window.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/lib/ecore_wayland/ecore_wl_window.c b/src/lib/ecore_wayland/ecore_wl_window.c
index 247691e..e5935b7 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
849 849
850 region = 850 region =
851 wl_compositor_create_region(_ecore_wl_compositor_get()); 851 wl_compositor_create_region(_ecore_wl_compositor_get());
852 if (!region)
853 {
854 wl_surface_set_opaque_region(win->surface, NULL);
855 return;
856 }
852 857
853 switch (win->rotation) 858 switch (win->rotation)
854 { 859 {