From 554ab4a6ba6ac022e5b6ae6cd0963ef4995bab6a Mon Sep 17 00:00:00 2001 From: Gwanglim Lee Date: Tue, 13 Oct 2015 14:20:38 +0900 Subject: [PATCH] ecore_wayland: fix dereference null pointer after wl_region_add Change-Id: I3fba93b436c66e43c31e021af302a5ecefb784ef --- src/lib/ecore_wayland/ecore_wl_subsurf.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lib/ecore_wayland/ecore_wl_subsurf.c b/src/lib/ecore_wayland/ecore_wl_subsurf.c index d6503f9..0959940 100644 --- a/src/lib/ecore_wayland/ecore_wl_subsurf.c +++ b/src/lib/ecore_wayland/ecore_wl_subsurf.c @@ -201,6 +201,8 @@ ecore_wl_subsurf_opaque_region_set(Ecore_Wl_Subsurf *ess, int x, int y, int w, i if (!wlcomp) return; region = wl_compositor_create_region(wlcomp); + if (!region) return; + wl_region_add(region, x, y, w, h); wl_surface_set_opaque_region(ess->surface, region); wl_region_destroy(region); -- 2.7.4