[gtk+] GtkWidget: fix insert_action_group(NULL)



commit 828a97d7739e04e12ef7a5cb91405ab804f03d2a
Author: Ryan Lortie <desrt desrt ca>
Date:   Thu Aug 23 08:18:11 2012 -0400

    GtkWidget: fix insert_action_group(NULL)
    
    gtk_widget_insert_action_group (widget, "foo", NULL) is valid, but
    g_action_muxer_insert (muxer, "foo", NULL) is not.  Use
    g_action_muxer_remove() for that case.

 gtk/gtkwidget.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index 629484e..f624250 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -14138,5 +14138,8 @@ gtk_widget_insert_action_group (GtkWidget    *widget,
 
   muxer = _gtk_widget_get_action_muxer (widget);
 
-  g_action_muxer_insert (muxer, name, group);
+  if (group)
+    g_action_muxer_insert (muxer, name, group);
+  else
+    g_action_muxer_remove (muxer, name);
 }



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