[seed] seed_get_class_info_for_type had a logic error, causing GIBaseInfos to be unreffed, in the case of "
- From: Robert Carr <racarr src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [seed] seed_get_class_info_for_type had a logic error, causing GIBaseInfos to be unreffed, in the case of "
- Date: Thu, 17 Dec 2009 20:40:27 +0000 (UTC)
commit a60bf4010a7c8c864cfdb5483ce3e5dc0f0d4977
Author: Robert Carr <racarr gnome org>
Date: Thu Dec 17 15:23:39 2009 -0500
seed_get_class_info_for_type had a logic error, causing GIBaseInfos to be unreffed, in the case of "They didn't exist".
This is obviously not a good idea and has been rectified. Closes BGO #593182
libseed/seed-gtype.c | 14 +++++++++-----
1 files changed, 9 insertions(+), 5 deletions(-)
---
diff --git a/libseed/seed-gtype.c b/libseed/seed-gtype.c
index f5db408..839e689 100644
--- a/libseed/seed-gtype.c
+++ b/libseed/seed-gtype.c
@@ -268,18 +268,22 @@ static GIBaseInfo *
seed_get_class_info_for_type (GType type)
{
GIBaseInfo *object_info;
-
+
+ // Note to self: Investigate the entire premise of this function.
while ((type = g_type_parent (type)))
{
+ GIBaseInfo *ret;
+
object_info = g_irepository_find_by_gtype (NULL, type);
if (object_info)
{
- return
- (GIBaseInfo *) g_object_info_get_class_struct
- ((GIObjectInfo *) object_info);
+ ret = g_object_info_get_class_struct ((GIObjectInfo *)object_info);
+ g_base_info_unref (object_info);
+
+ return ret;
}
- g_base_info_unref (object_info);
}
+
return NULL;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]