changeset 13734:714433bead7f

(x_set_menu_bar_lines) [USE_X_TOOLKIT]: Don't crash for non-X frame.
author Richard M. Stallman <rms@gnu.org>
date Fri, 15 Dec 1995 02:17:06 +0000
parents e51b69e60614
children 53ea087693a0
files src/xfns.c
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/xfns.c	Fri Dec 15 02:13:54 1995 +0000
+++ b/src/xfns.c	Fri Dec 15 02:17:06 1995 +0000
@@ -1697,7 +1697,7 @@
   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 @@
       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;