diff options
author | Gerd Moellmann <gerd@gnu.org> | 2001-04-05 13:07:44 +0000 |
---|---|---|
committer | Gerd Moellmann <gerd@gnu.org> | 2001-04-05 13:07:44 +0000 |
commit | ae5564222b7ce27ea8d9a9d83e2c1ce86f90a943 (patch) | |
tree | 4d95366e4c201d9c791dc970fbf9d9487807ca25 | |
parent | fc2cdd9a0fa5a7ee9c02d4e83459878568d07030 (diff) | |
download | emacs-ae5564222b7ce27ea8d9a9d83e2c1ce86f90a943.tar.gz |
(free_frame_menubar) [USE_MOTIF]: Preserve the
shell widget's position only if it is non-null.
-rw-r--r-- | src/xmenu.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/xmenu.c b/src/xmenu.c index 99f5c46a959..b4a1a87d4d9 100644 --- a/src/xmenu.c +++ b/src/xmenu.c @@ -1885,16 +1885,20 @@ free_frame_menubar (f) 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; |