From 5ebcf31112d7727e785d901999d7a4641397d3c3 Mon Sep 17 00:00:00 2001 From: Gustavo Sverzut Barbieri Date: Tue, 5 Feb 2008 16:33:24 +0000 Subject: [PATCH] Avoid invalid read, remove useless calls. e_object_del(E_OBJECT(pop->win)) will call ecore_evas_free() which calls evas_free() which deletes all the objects, making pop->o_bg a invalid read in its evas_object_del(). So it must be reordered, even better the evas_object_del(pop->o_bg) can be avoided. Since the window is deleted, no need to e_gadcon_popup_toggle_pinned() it. PS: need to check if there are users of o_con, if not, it should be removed too. SVN revision: 33679 --- src/bin/e_gadcon_popup.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/bin/e_gadcon_popup.c b/src/bin/e_gadcon_popup.c index c7bdc16ae..0d2135c12 100644 --- a/src/bin/e_gadcon_popup.c +++ b/src/bin/e_gadcon_popup.c @@ -175,9 +175,7 @@ static void _e_gadcon_popup_free(E_Gadcon_Popup *pop) { pop->gcc = NULL; - e_object_del(E_OBJECT(pop->win)); - if (pop->pinned) e_gadcon_popup_toggle_pinned(pop); - if (pop->o_bg) evas_object_del(pop->o_bg); if (pop->o_con) evas_object_del(pop->o_con); + e_object_del(E_OBJECT(pop->win)); free(pop); }