[gnome-terminal] window: Detach menu only if still attached



commit dd7750e3f01ae5e9be16426f8fafc7052512f476
Author: Christian Persch <chpe src gnome org>
Date:   Sun Nov 5 18:36:54 2017 +0100

    window: Detach menu only if still attached

 src/terminal-window.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/terminal-window.c b/src/terminal-window.c
index 45fbc62..0815ab8 100644
--- a/src/terminal-window.c
+++ b/src/terminal-window.c
@@ -298,7 +298,8 @@ popup_menu_selection_done_cb (GtkMenu *menu,
   /* g_printerr ("selection-done %p\n", menu); */
 
   /* This will remove the ref from the attach widget widget, and destroy the menu */
-  gtk_menu_detach (menu);
+  if (gtk_menu_get_attach_widget (menu) != NULL)
+    gtk_menu_detach (menu);
 }
 
 static void


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