forked from AuroraMiddleware/gtk
widget: Fix a memory leak with class actions
This code was doing the wrong thing even if the parent class doesn't have actions.
This commit is contained in:
parent
b996b85504
commit
fac435ba98
@ -12957,9 +12957,9 @@ gtk_widget_class_add_action (GtkWidgetClass *widget_class,
|
||||
|
||||
if (priv->actions == NULL)
|
||||
priv->actions = g_ptr_array_new ();
|
||||
else if (GTK_IS_WIDGET_CLASS (&widget_class->parent_class))
|
||||
else
|
||||
{
|
||||
GtkWidgetClass *parent_class = GTK_WIDGET_CLASS (&widget_class->parent_class);
|
||||
GtkWidgetClass *parent_class = GTK_WIDGET_CLASS (g_type_class_peek (g_type_parent (G_TYPE_FROM_CLASS (widget_class))));
|
||||
GtkWidgetClassPrivate *parent_priv = parent_class->priv;
|
||||
GPtrArray *parent_actions = parent_priv->actions;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user