ecore_evas_wayland_common: fix dereferenced bug 22/88622/1
authorJi-Youn Park <jy0703.park@samsung.com>
Tue, 20 Sep 2016 04:42:40 +0000 (13:12 +0830)
committerJi-Youn Park <jy0703.park@samsung.com>
Tue, 20 Sep 2016 04:42:40 +0000 (13:12 +0830)
Pointer 'ee' which was dereferenced at ecore_evas_wayland_common.c:687 is compared to NULL value at ecore_evas_wayland_common.c:693.

Change-Id: If9bb60cc57106b3b284b2448cdbf402dbd929910

src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c

index 1d32ac0..b54bdf1 100755 (executable)
@@ -684,13 +684,17 @@ _ecore_evas_wl_common_free(Ecore_Evas *ee)
 void
 _ecore_evas_wl_common_resize(Ecore_Evas *ee, int w, int h)
 {
-   Ecore_Evas_Engine_Wl_Data *wdata = ee->engine.data;
+   Ecore_Evas_Engine_Wl_Data *wdata;
    int orig_w, orig_h;
    int ow, oh;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
    if (!ee) return;
+
+   wdata = ee->engine.data;
+   if (!wdata) return;
+
    if (w < 1) w = 1;
    if (h < 1) h = 1;