Mercurial > emacs
comparison src/w32menu.c @ 39507:24530f82048e
(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 | Andrew Innes <andrewi@gnu.org> |
---|---|
date | Sun, 30 Sep 2001 21:54:04 +0000 |
parents | eb915f0b1d6e |
children | 5f60884970a8 |
comparison
equal
deleted
inserted
replaced
39506:a9746e8cd6d7 | 39507:24530f82048e |
---|---|
1353 items = FRAME_MENU_BAR_ITEMS (f); | 1353 items = FRAME_MENU_BAR_ITEMS (f); |
1354 | 1354 |
1355 inhibit_garbage_collection (); | 1355 inhibit_garbage_collection (); |
1356 | 1356 |
1357 /* Save the frame's previous menu bar contents data. */ | 1357 /* Save the frame's previous menu bar contents data. */ |
1358 bcopy (XVECTOR (f->menu_bar_vector)->contents, previous_items, | 1358 if (previous_menu_items_used) |
1359 previous_menu_items_used * sizeof (Lisp_Object)); | 1359 bcopy (XVECTOR (f->menu_bar_vector)->contents, previous_items, |
1360 previous_menu_items_used * sizeof (Lisp_Object)); | |
1360 | 1361 |
1361 /* Fill in the current menu bar contents. */ | 1362 /* Fill in the current menu bar contents. */ |
1362 menu_items = f->menu_bar_vector; | 1363 menu_items = f->menu_bar_vector; |
1363 menu_items_allocated = XVECTOR (menu_items)->size; | 1364 menu_items_allocated = VECTORP (menu_items) ? ASIZE (menu_items) : 0; |
1364 init_menu_items (); | 1365 init_menu_items (); |
1365 for (i = 0; i < XVECTOR (items)->size; i += 4) | 1366 for (i = 0; i < XVECTOR (items)->size; i += 4) |
1366 { | 1367 { |
1367 Lisp_Object key, string, maps; | 1368 Lisp_Object key, string, maps; |
1368 | 1369 |