summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDerek Foreman <derekf@osg.samsung.com>2018-03-26 12:29:41 -0500
committerDerek Foreman <derekf@osg.samsung.com>2018-04-20 13:00:28 -0500
commita297f17ac38ea25b63332c98a73518754e69c2b0 (patch)
tree9b4e456e3e735542ed915787c97260cf4d8f25b9 /src
parentf53bc90c6230bfde91e43330e9bd63c0ffc1e198 (diff)
ee_wayland: Add some NULL checks
These just protect against caller stupidity. Double register or double unregister shouldn't happen anyway.
Diffstat (limited to 'src')
-rw-r--r--src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c4
1 files changed, 3 insertions, 1 deletions
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 84ac300005..1f70d1cf47 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
@@ -55,6 +55,7 @@ _ecore_evas_wl_common_animator_register(Ecore_Evas *ee)
55 edata = (Ecore_Evas_Engine_Wl_Data *)ee->engine.data; 55 edata = (Ecore_Evas_Engine_Wl_Data *)ee->engine.data;
56 56
57 EINA_SAFETY_ON_TRUE_RETURN(edata->ticking); 57 EINA_SAFETY_ON_TRUE_RETURN(edata->ticking);
58 EINA_SAFETY_ON_TRUE_RETURN(edata->frame != NULL);
58 59
59 edata->frame = ecore_wl2_window_frame_callback_add(edata->win, 60 edata->frame = ecore_wl2_window_frame_callback_add(edata->win,
60 _anim_cb_tick, ee); 61 _anim_cb_tick, ee);
@@ -71,7 +72,8 @@ _ecore_evas_wl_common_animator_unregister(Ecore_Evas *ee)
71 72
72 edata = ee->engine.data; 73 edata = ee->engine.data;
73 edata->ticking = EINA_FALSE; 74 edata->ticking = EINA_FALSE;
74 ecore_wl2_window_frame_callback_del(edata->frame); 75 if (edata->frame)
76 ecore_wl2_window_frame_callback_del(edata->frame);
75 edata->frame = NULL; 77 edata->frame = NULL;
76} 78}
77 79