jpeg pushed a commit to branch master.

http://git.enlightenment.org/core/elementary.git/commit/?id=c665493038fcc2fb672ac4918af971e77b5d7e05

commit c665493038fcc2fb672ac4918af971e77b5d7e05
Author: Jean-Philippe Andre <jp.an...@samsung.com>
Date:   Wed Jul 29 22:13:07 2015 +0900

    elm_external: shutdown elm after del callback
    
    This fixes a crash in edje_inspector as:
    - delete callback is called on the object
     --> this unloaded elm
    - destructor is called on the object
     --> this did some elm stuff, in particular read the config
         from _elm_config (now NULL).
    
    Instead, shutdown elm after del, during free.
    
    Also reset hash pointer to NULL after free.
---
 src/edje_externals/elm.c | 12 +-----------
 src/lib/elm_config.c     |  3 +--
 2 files changed, 2 insertions(+), 13 deletions(-)

diff --git a/src/edje_externals/elm.c b/src/edje_externals/elm.c
index d85165d..9f6b872 100644
--- a/src/edje_externals/elm.c
+++ b/src/edje_externals/elm.c
@@ -31,15 +31,6 @@ external_elm_shutdown(void)
    elm_shutdown();
 }
 
-static void
-_external_obj_del(void *data EINA_UNUSED, Evas *evas EINA_UNUSED,
-                  Evas_Object *obj, void *event_info EINA_UNUSED)
-{
-   evas_object_event_callback_del(obj, EVAS_CALLBACK_DEL,
-                                  _external_obj_del);
-   external_elm_shutdown();
-}
-
 void
 external_signal(void *data EINA_UNUSED, Evas_Object *obj, const char *sig,
                 const char *source)
@@ -106,6 +97,7 @@ _external_signal_proxy_free_cb(void *data, Evas *e 
EINA_UNUSED,
                                void *event_info EINA_UNUSED)
 {
    Elm_External_Signals_Proxy_Context *ctxt = data;
+   external_elm_shutdown();
    free(ctxt);
 }
 
@@ -201,8 +193,6 @@ external_signals_proxy(Evas_Object *obj, Evas_Object *edje, 
const char *part_nam
         evas_object_smart_callback_add
            (obj, d->name, _external_signal_proxy_cb, ctxt);
      }
-   evas_object_event_callback_add(obj, EVAS_CALLBACK_DEL,
-                                  _external_obj_del, NULL);
 }
 
 void
diff --git a/src/lib/elm_config.c b/src/lib/elm_config.c
index 90fe31a..7349a3c 100644
--- a/src/lib/elm_config.c
+++ b/src/lib/elm_config.c
@@ -3574,6 +3574,5 @@ _elm_config_shutdown(void)
 
    _desc_shutdown();
 
-   if (_elm_key_bindings)
-     eina_hash_free(_elm_key_bindings);
+   ELM_SAFE_FREE(_elm_key_bindings, eina_hash_free);
 }

-- 


Reply via email to