Guard against null native names.

* glib/GType.cs: null guarding for native names
This commit is contained in:
Mike Kestner 2011-04-27 19:03:02 -05:00
parent 3170916774
commit 6fafc52670

View file

@ -159,6 +159,9 @@ namespace GLib {
static string GetQualifiedName (string cname) static string GetQualifiedName (string cname)
{ {
if (string.IsNullOrEmpty (cname))
return null;
for (int i = 1; i < cname.Length; i++) { for (int i = 1; i < cname.Length; i++) {
if (System.Char.IsUpper (cname[i])) { if (System.Char.IsUpper (cname[i])) {
if (i == 1 && cname [0] == 'G') if (i == 1 && cname [0] == 'G')