Commit 1fdfd6b4 authored by Christian Hergert's avatar Christian Hergert
Browse files

flatpak: check sdk property before overwriting

We want to avoid unnecessary property notification as well as ensure that
sdk and self->sdk are not the same pointers.
parent f2d2a6ad
......@@ -183,9 +183,12 @@ gbp_flatpak_configuration_set_sdk (GbpFlatpakConfiguration *self,
{
g_return_if_fail (GBP_IS_FLATPAK_CONFIGURATION (self));
g_free (self->sdk);
self->sdk = g_strdup (sdk);
g_object_notify_by_pspec (G_OBJECT (self), properties [PROP_SDK]);
if (g_strcmp0 (self->sdk, sdk) != 0)
{
g_free (self->sdk);
self->sdk = g_strdup (sdk);
g_object_notify_by_pspec (G_OBJECT (self), properties [PROP_SDK]);
}
}
static void
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment