changeset 109442:6c14b478b70f

* xmenu.c (free_frame_menubar): Only call x_set_window_size if widget is non-null (Bug#6645).
author Jan D <jan.h.d@swipnet.se>
date Fri, 16 Jul 2010 09:50:37 +0200
parents 0ed7d8444705
children 9e514d1076b4
files src/ChangeLog src/xmenu.c
diffstat 2 files changed, 8 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Thu Jul 15 23:54:10 2010 +0200
+++ b/src/ChangeLog	Fri Jul 16 09:50:37 2010 +0200
@@ -1,3 +1,8 @@
+2010-07-16  Jan Djärv  <jan.h.d@swipnet.se>
+
+	* xmenu.c (free_frame_menubar): Only call x_set_window_size if
+	widget is non-null (Bug#6645).
+
 2010-07-15  Andreas Schwab  <schwab@linux-m68k.org>
 
 	* xterm.c (x_fully_uncatch_errors, x_trace_wire, x_check_font):
--- a/src/xmenu.c	Thu Jul 15 23:54:10 2010 +0200
+++ b/src/xmenu.c	Fri Jul 16 09:50:37 2010 +0200
@@ -1355,15 +1355,15 @@
       lw_destroy_all_widgets ((LWLIB_ID) f->output_data.x->id);
       f->output_data.x->menubar_widget = NULL;
 
-#ifdef USE_MOTIF
       if (f->output_data.x->widget)
 	{
+#ifdef USE_MOTIF
 	  XtVaGetValues (f->output_data.x->widget, XtNx, &x1, XtNy, &y1, NULL);
 	  if (x1 == 0 && y1 == 0)
 	    XtVaSetValues (f->output_data.x->widget, XtNx, x0, XtNy, y0, NULL);
+#endif
+          x_set_window_size (f, 0, FRAME_COLS (f), FRAME_LINES (f));
 	}
-#endif
-      x_set_window_size (f, 0, FRAME_COLS (f), FRAME_LINES (f));
       UNBLOCK_INPUT;
     }
 }