summaryrefslogtreecommitdiff
path: root/src/xmenu.c
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2011-05-11 23:46:26 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2011-05-11 23:46:26 -0700
commitd89eb65e6d3a46ef9d04a950ee24352c146e4ea0 (patch)
treebdbf3ec79e261463ef56de1e54ec00a8156b42d9 /src/xmenu.c
parent5235bd3eb16b94dc5dcef3b1447f821fc09ea930 (diff)
downloademacs-d89eb65e6d3a46ef9d04a950ee24352c146e4ea0.tar.gz
* xmenu.c (set_frame_menubar): Don't mishandle vectors with no nils.
Diffstat (limited to 'src/xmenu.c')
-rw-r--r--src/xmenu.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/xmenu.c b/src/xmenu.c
index 2a4359fa84a..898aade06c2 100644
--- a/src/xmenu.c
+++ b/src/xmenu.c
@@ -922,7 +922,7 @@ set_frame_menubar (FRAME_PTR f, int first_time, int deep_p)
#endif
Lisp_Object items;
widget_value *wv, *first_wv, *prev_wv = 0;
- EMACS_UINT i, last_i = 0;
+ EMACS_UINT i, last_i;
int *submenu_start, *submenu_end;
int *submenu_top_level_items, *submenu_n_panes;
@@ -1021,8 +1021,6 @@ set_frame_menubar (FRAME_PTR f, int first_time, int deep_p)
{
Lisp_Object key, string, maps;
- last_i = i;
-
key = XVECTOR (items)->contents[4 * i];
string = XVECTOR (items)->contents[4 * i + 1];
maps = XVECTOR (items)->contents[4 * i + 2];
@@ -1039,6 +1037,7 @@ set_frame_menubar (FRAME_PTR f, int first_time, int deep_p)
submenu_end[i] = menu_items_used;
}
+ last_i = i;
finish_menu_items ();
/* Convert menu_items into widget_value trees