Don't operate on menu bar of nonexistent frame

* src/xfns.c (Fx_hide_tip) [USE_LUCID]: Check that the current frame
is valid before redisplaying its menu. Fixes bug#22438.
This commit is contained in:
Oscar Fuentes 2016-01-23 14:11:29 +01:00
parent c32f3bc4a3
commit 76045f7d6f

View file

@ -6084,16 +6084,19 @@ Value is t if tooltip was open, nil otherwise. */)
items is unmapped. Redisplay the menu manually... */
{
Widget w;
struct frame *f = SELECTED_FRAME ();
w = f->output_data.x->menubar_widget;
struct frame *f = SELECTED_FRAME ();
if (FRAME_X_P (f) && FRAME_LIVE_P (f))
{
w = f->output_data.x->menubar_widget;
if (!DoesSaveUnders (FRAME_DISPLAY_INFO (f)->screen)
&& w != NULL)
{
block_input ();
xlwmenu_redisplay (w);
unblock_input ();
}
if (!DoesSaveUnders (FRAME_DISPLAY_INFO (f)->screen)
&& w != NULL)
{
block_input ();
xlwmenu_redisplay (w);
unblock_input ();
}
}
}
#endif /* USE_LUCID */
}