ecore_evas_wayland: Add null check conditions in ecore evas wayland module
authorvivek <vivek.ellur@samsung.com>
Mon, 5 Jan 2015 14:09:02 +0000 (09:09 -0500)
committerChris Michael <cp.michael@samsung.com>
Mon, 5 Jan 2015 14:09:03 +0000 (09:09 -0500)
Summary:
Added null check conditions to check ecore_evas pointer in various places
of ecore evas wayland common module

Signed-off-by: vivek <vivek.ellur@samsung.com>
Reviewers: devilhorns

Reviewed By: devilhorns

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1812

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

index 568a02c..fa3d961 100644 (file)
@@ -572,6 +572,7 @@ _ecore_evas_wl_common_free(Ecore_Evas *ee)
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
+   if (!ee) return;
    wdata = ee->engine.data;
    if (wdata->frame_callback) wl_callback_destroy(wdata->frame_callback);
    wdata->frame_callback = NULL;
@@ -595,6 +596,7 @@ _ecore_evas_wl_common_resize(Ecore_Evas *ee, int w, int h)
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
+   if (!ee) return;
    if (w < 1) w = 1;
    if (h < 1) h = 1;
 
@@ -1162,6 +1164,7 @@ _ecore_evas_wl_common_aspect_set(Ecore_Evas *ee, double aspect)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
+   if (!ee) return;
    if (ee->prop.aspect == aspect) return;
    ee->prop.aspect = aspect;
 }
@@ -1182,6 +1185,7 @@ _ecore_evas_wl_common_object_cursor_set(Ecore_Evas *ee, Evas_Object *obj, int la
    Ecore_Evas_Engine_Wl_Data *wdata = ee->engine.data;
    Evas_Object *old;
 
+   if (!ee) return;
    old = ee->prop.cursor.object;
    if (obj == NULL)
      {
@@ -1335,6 +1339,7 @@ _ecore_evas_wl_common_pre_render(Ecore_Evas *ee)
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
+   if (!ee) return;
    if (ee->in_async_render)
      {
         /* EDBG("ee=%p is rendering asynchronously, skip", ee); */
@@ -1437,6 +1442,7 @@ _ecore_evas_wl_common_render(Ecore_Evas *ee)
    Ecore_Wl_Window *win = NULL;
    Ecore_Evas_Engine_Wl_Data *wdata;
 
+   if (!ee) return;
    if (!(wdata = ee->engine.data)) return 0;
    if (!(win = wdata->win)) return 0;