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.
This commit is contained in:
Christoph Reiter 2018-12-15 00:18:23 +01:00
parent e01e11be42
commit db90b3b3ae

View File

@ -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 */