Mercurial > emacs
changeset 38594:53ed5f089c9e
(set_frame_menubar): Take into account that
f->menu_bar_vector can be nil, and not a vector. From Ken Raeburn
<raeburn@gnu.org>.
author | Gerd Moellmann <gerd@gnu.org> |
---|---|
date | Mon, 30 Jul 2001 08:12:46 +0000 |
parents | bea0a90bac98 |
children | 396f97177ef1 |
files | src/xmenu.c |
diffstat | 1 files changed, 4 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/xmenu.c Mon Jul 30 06:23:47 2001 +0000 +++ b/src/xmenu.c Mon Jul 30 08:12:46 2001 +0000 @@ -1690,12 +1690,13 @@ inhibit_garbage_collection (); /* Save the frame's previous menu bar contents data. */ - bcopy (XVECTOR (f->menu_bar_vector)->contents, previous_items, - previous_menu_items_used * sizeof (Lisp_Object)); + if (previous_menu_items_used) + bcopy (XVECTOR (f->menu_bar_vector)->contents, previous_items, + previous_menu_items_used * sizeof (Lisp_Object)); /* Fill in the current menu bar contents. */ menu_items = f->menu_bar_vector; - menu_items_allocated = XVECTOR (menu_items)->size; + menu_items_allocated = VECTORP (menu_items) ? ASIZE (menu_items) : 0; init_menu_items (); for (i = 0; i < XVECTOR (items)->size; i += 4) {