diff src/xmenu.c @ 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 f8f118e78387
children 051595eb9b58
line wrap: on
line diff
--- 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;
     }
 }