]> git.eshelyaron.com Git - emacs.git/commitdiff
* gtkutil.c (menu_nav_ended): Check that menubar_widget is not NULL.
authorJan Djärv <jan.h.d@swipnet.se>
Fri, 2 Jun 2006 08:49:25 +0000 (08:49 +0000)
committerJan Djärv <jan.h.d@swipnet.se>
Fri, 2 Jun 2006 08:49:25 +0000 (08:49 +0000)
src/ChangeLog
src/gtkutil.c

index c74958d68b9d39c61fb25bbbf3d2195c03054259..a3c92e6f1a1970b0077f40cbdefed886a7f31ec1 100644 (file)
@@ -1,3 +1,7 @@
+2006-06-02  Jan Dj\e,Ad\e(Brv  <jan.h.d@swipnet.se>
+
+       * gtkutil.c (menu_nav_ended): Check that menubar_widget is not NULL.
+
 2006-06-01  Richard Stallman  <rms@gnu.org>
 
        * window.c (Fsplit_window): Doc fix.
index 7d9778bfd53628576889846ca440d3b1f625f6f8..2a6ed9d1524790bb8cf864bdc5b3401351fbf9ac 100644 (file)
@@ -1981,16 +1981,20 @@ menu_nav_ended (wmenu, data)
      gpointer data;
 {
   FRAME_PTR f = (FRAME_PTR) data;
-  Display *dpy = FRAME_X_DISPLAY (f);
 
-  BLOCK_INPUT;
+  if (FRAME_X_OUTPUT (f)->menubar_widget)
+    {
       GtkMenuShell *w = GTK_MENU_SHELL (FRAME_X_OUTPUT (f)->menubar_widget);
+      Display *dpy = FRAME_X_DISPLAY (f);
+
+      BLOCK_INPUT;
       gtk_menu_shell_deactivate (w);
       gtk_menu_shell_deselect (w);
 
-  XUngrabKeyboard (dpy, CurrentTime);
-  XUngrabPointer (dpy, CurrentTime);
-  UNBLOCK_INPUT;
+      XUngrabKeyboard (dpy, CurrentTime);
+      XUngrabPointer (dpy, CurrentTime);
+      UNBLOCK_INPUT;
+    }
 }