[gnome-builder/wip/gtk4-port] plugins/meson: allow overwriting value



commit 40644241cb3fb5c27e04353823fbb1fe4a1fed05
Author: Christian Hergert <chergert redhat com>
Date:   Thu Jun 30 17:06:15 2022 -0700

    plugins/meson: allow overwriting value

 src/plugins/meson/gbp-meson-introspection.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/src/plugins/meson/gbp-meson-introspection.c b/src/plugins/meson/gbp-meson-introspection.c
index 70309ca7b..59038844d 100644
--- a/src/plugins/meson/gbp-meson-introspection.c
+++ b/src/plugins/meson/gbp-meson-introspection.c
@@ -62,7 +62,8 @@ get_string_member (JsonObject  *object,
   g_assert (object != NULL);
   g_assert (member != NULL);
   g_assert (location != NULL);
-  g_assert (*location == NULL);
+
+  g_clear_pointer (location, g_free);
 
   if (json_object_has_member (object, member) &&
       (node = json_object_get_member (object, member)) &&
@@ -86,7 +87,8 @@ get_strv_member (JsonObject   *object,
   g_assert (object != NULL);
   g_assert (member != NULL);
   g_assert (location != NULL);
-  g_assert (*location == NULL);
+
+  g_clear_pointer (location, g_strfreev);
 
   if (json_object_has_member (object, member) &&
       (node = json_object_get_member (object, member)) &&


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