(x_set_menu_bar_lines) [USE_X_TOOLKIT]:

Don't crash for non-X frame.
This commit is contained in:
Richard M. Stallman 1995-12-15 02:17:06 +00:00
parent 69f033abe1
commit 97a1ff91ab

View file

@ -1697,7 +1697,7 @@ x_set_menu_bar_lines (f, value, oldval)
if (nlines)
{
FRAME_EXTERNAL_MENU_BAR (f) = 1;
if (f->output_data.x->menubar_widget == 0)
if (FRAME_X_P (f) && f->output_data.x->menubar_widget == 0)
/* Make sure next redisplay shows the menu bar. */
XWINDOW (FRAME_SELECTED_WINDOW (f))->update_mode_line = Qt;
}
@ -1706,7 +1706,8 @@ x_set_menu_bar_lines (f, value, oldval)
if (FRAME_EXTERNAL_MENU_BAR (f) == 1)
free_frame_menubar (f);
FRAME_EXTERNAL_MENU_BAR (f) = 0;
f->output_data.x->menubar_widget = 0;
if (FRAME_X_P (f))
f->output_data.x->menubar_widget = 0;
}
#else /* not USE_X_TOOLKIT */
FRAME_MENU_BAR_LINES (f) = nlines;