summaryrefslogtreecommitdiff
path: root/src/edje_externals/elm.c
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2015-07-29 22:13:07 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2015-07-29 22:23:19 +0900
commitc665493038fcc2fb672ac4918af971e77b5d7e05 (patch)
tree39db0fb49fbf3ac6a1301b15bdfa2f40453808e3 /src/edje_externals/elm.c
parentf638f79b66db474913d58d823c2efe91fc9fef29 (diff)
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.
Diffstat (limited to 'src/edje_externals/elm.c')
-rw-r--r--src/edje_externals/elm.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/src/edje_externals/elm.c b/src/edje_externals/elm.c
index d85165d3f..9f6b87284 100644
--- a/src/edje_externals/elm.c
+++ b/src/edje_externals/elm.c
@@ -31,15 +31,6 @@ external_elm_shutdown(void)
31 elm_shutdown(); 31 elm_shutdown();
32} 32}
33 33
34static void
35_external_obj_del(void *data EINA_UNUSED, Evas *evas EINA_UNUSED,
36 Evas_Object *obj, void *event_info EINA_UNUSED)
37{
38 evas_object_event_callback_del(obj, EVAS_CALLBACK_DEL,
39 _external_obj_del);
40 external_elm_shutdown();
41}
42
43void 34void
44external_signal(void *data EINA_UNUSED, Evas_Object *obj, const char *sig, 35external_signal(void *data EINA_UNUSED, Evas_Object *obj, const char *sig,
45 const char *source) 36 const char *source)
@@ -106,6 +97,7 @@ _external_signal_proxy_free_cb(void *data, Evas *e EINA_UNUSED,
106 void *event_info EINA_UNUSED) 97 void *event_info EINA_UNUSED)
107{ 98{
108 Elm_External_Signals_Proxy_Context *ctxt = data; 99 Elm_External_Signals_Proxy_Context *ctxt = data;
100 external_elm_shutdown();
109 free(ctxt); 101 free(ctxt);
110} 102}
111 103
@@ -201,8 +193,6 @@ external_signals_proxy(Evas_Object *obj, Evas_Object *edje, const char *part_nam
201 evas_object_smart_callback_add 193 evas_object_smart_callback_add
202 (obj, d->name, _external_signal_proxy_cb, ctxt); 194 (obj, d->name, _external_signal_proxy_cb, ctxt);
203 } 195 }
204 evas_object_event_callback_add(obj, EVAS_CALLBACK_DEL,
205 _external_obj_del, NULL);
206} 196}
207 197
208void 198void