[gnome-builder/gnome-builder-3-26] flatpak: compare strings before changing property
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/gnome-builder-3-26] flatpak: compare strings before changing property
- Date: Wed, 20 Sep 2017 20:32:38 +0000 (UTC)
commit 901bdb733d260071cdaca02d5d3a03b52c3f12be
Author: Christian Hergert <chergert redhat com>
Date: Wed Sep 20 13:30:13 2017 -0700
flatpak: compare strings before changing property
plugins/flatpak/gbp-flatpak-runtime.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/plugins/flatpak/gbp-flatpak-runtime.c b/plugins/flatpak/gbp-flatpak-runtime.c
index f5a65bb..8c82d45 100644
--- a/plugins/flatpak/gbp-flatpak-runtime.c
+++ b/plugins/flatpak/gbp-flatpak-runtime.c
@@ -518,9 +518,12 @@ gbp_flatpak_runtime_set_sdk (GbpFlatpakRuntime *self,
{
g_return_if_fail (GBP_IS_FLATPAK_RUNTIME (self));
- g_free (self->sdk);
- self->sdk = g_strdup (sdk);
- g_object_notify_by_pspec (G_OBJECT (self), properties [PROP_SDK]);
+ if (g_strcmp0 (sdk, self->sdk) != 0)
+ {
+ g_free (self->sdk);
+ self->sdk = g_strdup (sdk);
+ g_object_notify_by_pspec (G_OBJECT (self), properties [PROP_SDK]);
+ }
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]