From c5f6c3941ce11a521fbb4dfcb169e431196ca7a1 Mon Sep 17 00:00:00 2001 From: vivek Date: Mon, 5 Jan 2015 09:09:02 -0500 Subject: [PATCH] ecore_evas_wayland: Add null check conditions in ecore evas wayland module Summary: Added null check conditions to check ecore_evas pointer in various places of ecore evas wayland common module Signed-off-by: vivek Reviewers: devilhorns Reviewed By: devilhorns Subscribers: cedric Differential Revision: https://phab.enlightenment.org/D1812 --- .../ecore_evas/engines/wayland/ecore_evas_wayland_common.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c index 568a02cadf..fa3d9610f0 100644 --- a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c +++ b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c @@ -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;