summaryrefslogtreecommitdiff
path: root/girepository
diff options
context:
space:
mode:
authorChristoph Reiter <reiter.christoph@gmail.com>2018-12-15 00:18:23 +0100
committerChristoph Reiter <reiter.christoph@gmail.com>2018-12-15 23:33:32 +0000
commit0cc1dcc0afd0424e79235ed3053bdbfb83f7adb0 (patch)
treea942356f7a34e4a1380787a5f56886ba8d72000d /girepository
parent3e0c101aeb102071d50215cbdc928f41415b2307 (diff)
downloadgobject-introspection-0cc1dcc0afd0424e79235ed3053bdbfb83f7adb0.tar.gz
baseinfo: don't abort when calling g_base_info_get_name() on a GITypeInfo. Fixes #96
GITypeInfo is a GIBaseInfo so calling g_base_info_get_name() on it should do something sensible. g_base_info_get_name() has always been documented to return NULL in case no name is available so return that instead.
Diffstat (limited to 'girepository')
-rw-r--r--girepository/gibaseinfo.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/girepository/gibaseinfo.c b/girepository/gibaseinfo.c
index ced7674e..e47d5390 100644
--- a/girepository/gibaseinfo.c
+++ b/girepository/gibaseinfo.c
@@ -377,6 +377,7 @@ g_base_info_get_name (GIBaseInfo *info)
}
break;
case GI_INFO_TYPE_TYPE:
+ return NULL;
default: ;
g_assert_not_reached ();
/* unnamed */