From 76045f7d6f654ea20e09412e5054f9159d1bb142 Mon Sep 17 00:00:00 2001 From: Oscar Fuentes Date: Sat, 23 Jan 2016 14:11:29 +0100 Subject: [PATCH] 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. --- src/xfns.c | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/src/xfns.c b/src/xfns.c index aad9680c4df..9624ac5d9ac 100644 --- a/src/xfns.c +++ b/src/xfns.c @@ -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 */ } -- 2.39.2