From 52ccfe995c8eef190761bcdf8bbd4088b8713f8d Mon Sep 17 00:00:00 2001 From: Jaehwan Kim Date: Tue, 19 Mar 2013 19:42:34 +0900 Subject: [PATCH] Fix the elm_shutdown bug in _elm_shutdown_config. When the elm_shutdown is used after elm_config_all_flush, the segment fault occur. It's why it uses ecore_x in _prop_all_update_cb after removing it. --- ChangeLog | 6 ++++++ NEWS | 1 + src/lib/elm_config.c | 22 +++++++++++----------- 3 files changed, 18 insertions(+), 11 deletions(-) diff --git a/ChangeLog b/ChangeLog index 25e5eaa..ab39c46 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1161,3 +1161,9 @@ 2013-03-18 WooHyun Jung * Focus highlight should be reconfigured when theme is changed. + +2013-03-19 Jaehwan Kim + + * Fix the elm_shutdown bug in _elm_shutdown_config. + When the elm_shutdown is used after elm_config_all_flush, the segment fault occur. + It's why it uses ecore_x in _prop_all_update_cb after removing it. diff --git a/NEWS b/NEWS index bb317ca..b322f5d 100644 --- a/NEWS +++ b/NEWS @@ -186,6 +186,7 @@ Fixes: * Fixed a bug in elm_list. Focus_next is needed only when access mode is enabled. * Fix a memory leak of elm_genlist - EINA_LIST_FREE should be used for returned value of elm_genlist_realized_items_get * Focus highlight should be reconfigured when theme is changed. + * Fix the elm_shutdown bug in _elm_shutdown_config. Removals: diff --git a/src/lib/elm_config.c b/src/lib/elm_config.c index f5ff097..d29ef71 100644 --- a/src/lib/elm_config.c +++ b/src/lib/elm_config.c @@ -2260,6 +2260,17 @@ _elm_config_init(void) void _elm_config_sub_shutdown(void) { +#ifdef HAVE_ELEMENTARY_X + if (_prop_all_update_timer) + { + ecore_timer_del(_prop_all_update_timer); + _prop_all_update_timer = NULL; + _prop_all_update_cb(NULL); + } + if (_prop_change_delay_timer) ecore_timer_del(_prop_change_delay_timer); + _prop_change_delay_timer = NULL; +#endif + #define ENGINE_COMPARE(name) (!strcmp(_elm_config->engine, name)) if (ENGINE_COMPARE(ELM_SOFTWARE_X11) || ENGINE_COMPARE(ELM_SOFTWARE_16_X11) || @@ -2412,17 +2423,6 @@ _elm_config_profile_set(const char *profile) void _elm_config_shutdown(void) { -#ifdef HAVE_ELEMENTARY_X - if (_prop_all_update_timer) - { - ecore_timer_del(_prop_all_update_timer); - _prop_all_update_timer = NULL; - _prop_all_update_cb(NULL); - } - if (_prop_change_delay_timer) ecore_timer_del(_prop_change_delay_timer); - _prop_change_delay_timer = NULL; -#endif - #define ENGINE_COMPARE(name) (!strcmp(_elm_config->engine, name)) if (ENGINE_COMPARE(ELM_SOFTWARE_X11) || ENGINE_COMPARE(ELM_SOFTWARE_16_X11) || -- 2.7.4