diff options
| author | Gerd Moellmann | 2001-07-30 08:12:46 +0000 |
|---|---|---|
| committer | Gerd Moellmann | 2001-07-30 08:12:46 +0000 |
| commit | 86c041835c3afa2d324377e322a7acfca133a9d2 (patch) | |
| tree | f7d305e3fd9e7822322d2d949770773b2dbfe842 /src | |
| parent | 291e3b68cf13f930c6de44a08dbf5d76f16fef0c (diff) | |
| download | emacs-86c041835c3afa2d324377e322a7acfca133a9d2.tar.gz emacs-86c041835c3afa2d324377e322a7acfca133a9d2.zip | |
(set_frame_menubar): Take into account that
f->menu_bar_vector can be nil, and not a vector. From Ken Raeburn
<raeburn@gnu.org>.
Diffstat (limited to 'src')
| -rw-r--r-- | src/xmenu.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/xmenu.c b/src/xmenu.c index d6ee9056a55..b33e8f0e591 100644 --- a/src/xmenu.c +++ b/src/xmenu.c | |||
| @@ -1690,12 +1690,13 @@ set_frame_menubar (f, first_time, deep_p) | |||
| 1690 | inhibit_garbage_collection (); | 1690 | inhibit_garbage_collection (); |
| 1691 | 1691 | ||
| 1692 | /* Save the frame's previous menu bar contents data. */ | 1692 | /* Save the frame's previous menu bar contents data. */ |
| 1693 | bcopy (XVECTOR (f->menu_bar_vector)->contents, previous_items, | 1693 | if (previous_menu_items_used) |
| 1694 | previous_menu_items_used * sizeof (Lisp_Object)); | 1694 | bcopy (XVECTOR (f->menu_bar_vector)->contents, previous_items, |
| 1695 | previous_menu_items_used * sizeof (Lisp_Object)); | ||
| 1695 | 1696 | ||
| 1696 | /* Fill in the current menu bar contents. */ | 1697 | /* Fill in the current menu bar contents. */ |
| 1697 | menu_items = f->menu_bar_vector; | 1698 | menu_items = f->menu_bar_vector; |
| 1698 | menu_items_allocated = XVECTOR (menu_items)->size; | 1699 | menu_items_allocated = VECTORP (menu_items) ? ASIZE (menu_items) : 0; |
| 1699 | init_menu_items (); | 1700 | init_menu_items (); |
| 1700 | for (i = 0; i < XVECTOR (items)->size; i += 4) | 1701 | for (i = 0; i < XVECTOR (items)->size; i += 4) |
| 1701 | { | 1702 | { |