]> Pileus Git - ~andy/gtk/commitdiff
GtkWidget: fix insert_action_group(NULL)
authorRyan Lortie <desrt@desrt.ca>
Thu, 23 Aug 2012 12:18:11 +0000 (08:18 -0400)
committerRyan Lortie <desrt@desrt.ca>
Thu, 23 Aug 2012 12:18:11 +0000 (08:18 -0400)
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

index 629484e6e4e4be0890fa962ec0768d0bff850cbc..f624250f70580e71644b08b45881bab31a68eccc 100644 (file)
@@ -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);
 }