From: Richard M. Stallman Date: Fri, 15 Dec 1995 02:17:06 +0000 (+0000) Subject: (x_set_menu_bar_lines) [USE_X_TOOLKIT]: X-Git-Tag: emacs-19.34~2126 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=97a1ff91ab090368e6e26c128562acd381294f5a;p=emacs.git (x_set_menu_bar_lines) [USE_X_TOOLKIT]: Don't crash for non-X frame. --- diff --git a/src/xfns.c b/src/xfns.c index e55dc0bec44..bb3c6fbe3d7 100644 --- a/src/xfns.c +++ b/src/xfns.c @@ -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;