# HG changeset patch # User Sadrul Habib Chowdhury # Date 1191395343 0 # Node ID 4d6828b8da3e85902aea80172d228e079a2d543d # Parent b65f1bff6412c1d1f845544a0997027ab4920b3a Toplevel boxes don't have menus. diff -r b65f1bff6412 -r 4d6828b8da3e finch/libgnt/gntwm.c --- a/finch/libgnt/gntwm.c Wed Oct 03 06:51:26 2007 +0000 +++ b/finch/libgnt/gntwm.c Wed Oct 03 07:09:03 2007 +0000 @@ -1855,11 +1855,13 @@ ret = gnt_widget_key_pressed(wm->_list.window, keys); else if (wm->cws->ordered) { GntWidget *win = wm->cws->ordered->data; - GntMenu *menu = GNT_WINDOW(win)->menu; - if (menu) { - const char *id = gnt_window_get_accel_item(GNT_WINDOW(win), keys); - if (id) - ret = (gnt_menu_get_item(menu, id) != NULL); + if (GNT_IS_WINDOW(win)) { + GntMenu *menu = GNT_WINDOW(win)->menu; + if (menu) { + const char *id = gnt_window_get_accel_item(GNT_WINDOW(win), keys); + if (id) + ret = (gnt_menu_get_item(menu, id) != NULL); + } } if (!ret) ret = gnt_widget_key_pressed(win, keys);