typelib: Also ignore typelibs with empty c:prefix

As seen in xlib.gir at least; this is something we should probably ban
though.

https://bugzilla.gnome.org/697759
This commit is contained in:
Colin Walters 2013-04-12 13:39:21 -04:00
parent 2e4e98c978
commit 273178600c

View File

@ -294,7 +294,7 @@ g_typelib_matches_gtype_name_prefix (GITypelib *typelib,
gsize gtype_name_len;
c_prefix = g_typelib_get_string (typelib, header->c_prefix);
if (c_prefix == NULL)
if (c_prefix == NULL || strlen (c_prefix) == 0)
return FALSE;
gtype_name_len = strlen (gtype_name);