X-Git-Url: http://git.openbox.org/?p=dana%2Fopenbox.git;a=blobdiff_plain;f=openbox%2Fmenuframe.c;h=4887173b40c04ed1e8592011b38f2d4c9ed01e4b;hp=6110045cc459dd2596781242c90c4be3d72b2d93;hb=f53fa1e589589a6ea2a0e91d372d9771fa1cdd04;hpb=fbc3e344cdbb0fc70b960c60153bd86d56b9eb43 diff --git a/openbox/menuframe.c b/openbox/menuframe.c index 6110045..4887173 100644 --- a/openbox/menuframe.c +++ b/openbox/menuframe.c @@ -1046,8 +1046,11 @@ gboolean menu_frame_show_submenu(ObMenuFrame *self, ObMenuFrame *parent, parent->child_entry = parent_entry; } - if (!menu_frame_show(self)) + if (!menu_frame_show(self)) { + parent->child = NULL; + parent->child_entry = NULL; return FALSE; + } menu_frame_place_submenu(self, &x, &y); menu_frame_move_on_screen(self, x, y, &dx, &dy); @@ -1272,7 +1275,8 @@ void menu_entry_frame_show_submenu(ObMenuEntryFrame *self) /* pass our direction on to our child */ f->direction_right = self->frame->direction_right; - menu_frame_show_submenu(f, self->frame, self); + if (!menu_frame_show_submenu(f, self->frame, self)) + menu_frame_free(f); } void menu_entry_frame_execute(ObMenuEntryFrame *self, guint state)