Only unref the repository if it's actually set.
authorJohan Dahlin <jdahlin@async.com.br>
Mon, 26 Jan 2009 17:56:48 +0000 (17:56 +0000)
committerJohan Dahlin <johan@src.gnome.org>
Mon, 26 Jan 2009 17:56:48 +0000 (17:56 +0000)
2009-01-26  Johan Dahlin  <jdahlin@async.com.br>

        * girepository/ginfo.c (g_base_info_unref):
        Only unref the repository if it's actually set.

svn path=/trunk/; revision=1068

ChangeLog
girepository/ginfo.c

index d2f2dbd..75fe411 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2009-01-26  Johan Dahlin  <jdahlin@async.com.br>
+
+       * girepository/ginfo.c (g_base_info_unref):
+       Only unref the repository if it's actually set.
+
 2009-01-23  Johan Dahlin  <jdahlin@async.com.br>
 
        * tests/everything/everything.c (test_enum_param):
index 8324c05..97aa534 100644 (file)
@@ -227,7 +227,8 @@ g_base_info_unref (GIBaseInfo *info)
       if (info->container)
        g_base_info_unref (info->container);
 
-      g_object_unref (info->repository);
+      if (info->repository)
+        g_object_unref (info->repository);
 
       g_free (info);
     }