[gtk+/wip/action-helper] GtkActionHelper: permit NULL widget



commit c8ca03c69a32cf93522c8459f8035a758522b09b
Author: Ryan Lortie <desrt desrt ca>
Date:   Sat Jun 16 22:53:42 2012 -0400

    GtkActionHelper: permit NULL widget

 gtk/gtkactionhelper.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkactionhelper.c b/gtk/gtkactionhelper.c
index abd755a..c22816f 100644
--- a/gtk/gtkactionhelper.c
+++ b/gtk/gtkactionhelper.c
@@ -431,7 +431,10 @@ gtk_action_helper_actions_changed (GtkWidget   *widget,
   if (action_group_name && !g_str_equal (action_group_name, helper->action_group_name))
     return;
 
-  group = gtk_widget_get_action_group_by_name (GTK_WIDGET (helper->widget), helper->action_group_name);
+  if (helper->widget)
+    group = gtk_widget_get_action_group_by_name (GTK_WIDGET (helper->widget), helper->action_group_name);
+  else
+    group = NULL;
 
   /* We didn't have the group before and we still don't have it now. */
   if (group == NULL && helper->group == NULL)



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