emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs-25 76045f7: Don't operate on menu bar of nonexistent


From: Oscar Fuentes
Subject: [Emacs-diffs] emacs-25 76045f7: Don't operate on menu bar of nonexistent frame
Date: Sat, 23 Jan 2016 13:20:04 +0000

branch: emacs-25
commit 76045f7d6f654ea20e09412e5054f9159d1bb142
Author: Oscar Fuentes <address@hidden>
Commit: Oscar Fuentes <address@hidden>

    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 files changed, 12 insertions(+), 9 deletions(-)

diff --git a/src/xfns.c b/src/xfns.c
index aad9680..9624ac5 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 */
     }



reply via email to

[Prev in Thread] Current Thread [Next in Thread]