ecore_wayland: fix dereference null pointer after wl_region_add 05/49405/1
authorGwanglim Lee <gl77.lee@samsung.com>
Tue, 13 Oct 2015 05:20:38 +0000 (14:20 +0900)
committerGwanglim Lee <gl77.lee@samsung.com>
Tue, 13 Oct 2015 05:20:38 +0000 (14:20 +0900)
Change-Id: I3fba93b436c66e43c31e021af302a5ecefb784ef

src/lib/ecore_wayland/ecore_wl_subsurf.c

index d6503f9..0959940 100644 (file)
@@ -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);