changeset 37211:afa458ac7a62

(free_frame_menubar) [USE_MOTIF]: Preserve the shell widget's position only if it is non-null.
author Gerd Moellmann <gerd@gnu.org>
date Thu, 05 Apr 2001 13:07:44 +0000
parents 8b47704e0150
children 5c27e50f91d1
files src/xmenu.c
diffstat 1 files changed, 8 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/xmenu.c	Thu Apr 05 13:07:22 2001 +0000
+++ b/src/xmenu.c	Thu Apr 05 13:07:44 2001 +0000
@@ -1885,16 +1885,20 @@
       BLOCK_INPUT;
 
 #ifdef USE_MOTIF
-      XtVaGetValues (f->output_data.x->widget, XtNx, &x0, XtNy, &y0, NULL);
+      if (f->output_data.x->widget)
+	XtVaGetValues (f->output_data.x->widget, XtNx, &x0, XtNy, &y0, NULL);
 #endif
       
       lw_destroy_all_widgets ((LWLIB_ID) f->output_data.x->id);
       f->output_data.x->menubar_widget = NULL;
 
 #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);
+      if (f->output_data.x->widget)
+	{
+	  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
       
       UNBLOCK_INPUT;