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
This commit is contained in:
parent
40caec09e9
commit
4a48aa32d5
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue