forked from AuroraMiddleware/gtk
builder: Don't leak refs
We sometimes end up setting an object on a GValue that we are then not interested in. We need to unset it, or we'll leak the ref.
This commit is contained in:
parent
4fff68355a
commit
6b86848984
@ -606,16 +606,12 @@ gtk_builder_get_parameters (GtkBuilder *builder,
|
||||
continue;
|
||||
}
|
||||
|
||||
if (prop->pspec->flags & filter_flags)
|
||||
{
|
||||
if (filtered_parameters)
|
||||
object_properties_add (filtered_parameters, property_name, &property_value);
|
||||
}
|
||||
if ((prop->pspec->flags & filter_flags) != 0 && filtered_parameters)
|
||||
object_properties_add (filtered_parameters, property_name, &property_value);
|
||||
else if ((prop->pspec->flags & filter_flags) == 0 && parameters)
|
||||
object_properties_add (parameters, property_name, &property_value);
|
||||
else
|
||||
{
|
||||
if (parameters)
|
||||
object_properties_add (parameters, property_name, &property_value);
|
||||
}
|
||||
g_value_unset (&property_value);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user