[gobject-introspection] gimarshallingtests: Fix g_boxed_free usage



commit 9748b3e9a0732a173337dcd64266e803a3c77c0e
Author: Philip Chimento <philip chimento gmail com>
Date:   Sat Jul 28 17:33:13 2018 -0400

    gimarshallingtests: Fix g_boxed_free usage
    
    I made this edit to Simon's commit to resolve a merge conflict, but I
    messed it up. Revert to what it was before.
    
    See #113.

 tests/gimarshallingtests.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/tests/gimarshallingtests.c b/tests/gimarshallingtests.c
index 4465bcb6..d65ce538 100644
--- a/tests/gimarshallingtests.c
+++ b/tests/gimarshallingtests.c
@@ -5371,11 +5371,15 @@ gi_marshalling_tests_properties_object_finalize (GObject *obj)
   GIMarshallingTestsPropertiesObject *self;
   self = GI_MARSHALLING_TESTS_PROPERTIES_OBJECT (obj);
 
+  if (self->some_gvalue) {
+    g_boxed_free (G_TYPE_VALUE, self->some_gvalue);
+    self->some_gvalue = NULL;
+  }
+
   g_clear_pointer (&self->some_strv, g_strfreev);
   g_clear_pointer (&self->some_boxed_struct, gi_marshalling_tests_boxed_struct_free);
   g_clear_pointer (&self->some_variant, g_variant_unref);
   g_clear_pointer (&self->some_boxed_glist, g_list_free);
-  g_clear_pointer (&self->some_gvalue, g_boxed_free);
   g_clear_object (&self->some_object);
 
   G_OBJECT_CLASS (gi_marshalling_tests_properties_object_parent_class)->finalize (obj);


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