summaryrefslogtreecommitdiff
path: root/src/lib/ecore_evas/ecore_evas.c
diff options
context:
space:
mode:
authorYeongJong Lee <yj34.lee@samsung.com>2018-06-25 15:14:01 -0400
committerMike Blumenkrantz <zmike@samsung.com>2018-06-25 15:14:31 -0400
commita522bf5d7625c49cfd4d25f477633b764f2317f8 (patch)
tree671ac5835f80233672a59f819693ee85955f7c43 /src/lib/ecore_evas/ecore_evas.c
parent0e40fad4466a60238438c131b3331319c38c694b (diff)
ecore_evas: prevent duplicated ecore_evas registration
Summary: After a44697c37a304c0d4d574b6772775c6936869e24, we can register same ecore_evas to ecore_evases using ecore_evas_input_event_register. (ecore_evas_input_event_register -> ecore_evas_done -> _ecore_evas_register) This can make infinite loop in EINA_INLIST_FOREACH(ecore_evases, ee) because next inlist of ecore_evases is ecore_evases after double call of _ecore_evas_register. This patch prevent it. Test Plan: Ecore_Evas *ee = ecore_evas_new(NULL, 0, 0, 800, 600, NULL); ecore_evas_input_event_register(ee); (part of document of ecore_fb_input_device_window_set) Check that there is no infinite loop Reviewers: zmike, devilhorns Reviewed By: zmike Subscribers: cedric, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D6390
Diffstat (limited to 'src/lib/ecore_evas/ecore_evas.c')
-rw-r--r--src/lib/ecore_evas/ecore_evas.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/lib/ecore_evas/ecore_evas.c b/src/lib/ecore_evas/ecore_evas.c
index da3401a..52dfc36 100644
--- a/src/lib/ecore_evas/ecore_evas.c
+++ b/src/lib/ecore_evas/ecore_evas.c
@@ -3256,6 +3256,8 @@ _ecore_evas_register_animators(Ecore_Evas *ee)
3256EAPI void 3256EAPI void
3257_ecore_evas_register(Ecore_Evas *ee) 3257_ecore_evas_register(Ecore_Evas *ee)
3258{ 3258{
3259 if (ee->registered) return;
3260
3259 ee->registered = 1; 3261 ee->registered = 1;
3260 ecore_evases = (Ecore_Evas *)eina_inlist_prepend 3262 ecore_evases = (Ecore_Evas *)eina_inlist_prepend
3261 (EINA_INLIST_GET(ecore_evases), EINA_INLIST_GET(ee)); 3263 (EINA_INLIST_GET(ecore_evases), EINA_INLIST_GET(ee));