discomfitor pushed a commit to branch enlightenment-0.19.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=4a48aa32d5397f38e806329f15265bb926531014

commit 4a48aa32d5397f38e806329f15265bb926531014
Author: Carsten Haitzler (Rasterman) <ras...@rasterman.com>
Date:   Tue Jun 9 14:29:25 2015 +0900

    e - shelf menu - handle deletion properly if cb is not for shelf menu
    
    it seems that some changes now make the shel menu post callback be
    called for older menus not part of the shelf and thus shelf menu
    stored != menu the cb is for - thus resulting in deletion of the wrong
    menu
---
 src/bin/e_shelf.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/bin/e_shelf.c b/src/bin/e_shelf.c
index 9b2fbea..4c63e02 100644
--- a/src/bin/e_shelf.c
+++ b/src/bin/e_shelf.c
@@ -1615,13 +1615,13 @@ _e_shelf_cb_menu_delete(void *data, E_Menu *m 
__UNUSED__, E_Menu_Item *mi __UNUS
 }
 
 static void
-_e_shelf_cb_menu_post(void *data, E_Menu *m __UNUSED__)
+_e_shelf_cb_menu_post(void *data, E_Menu *m)
 {
    E_Shelf *es;
 
    es = data;
-   if (!es->menu) return;
-   e_object_del(E_OBJECT(es->menu));
+   e_object_del(E_OBJECT(m));
+   if (m != es->menu) return;
    es->menu = NULL;
 }
 

-- 


Reply via email to