Make sure that every second parameter to Structure.Add(...) is a string
This commit is contained in:
parent
7fb126bfd1
commit
55df427fab
@ -168,6 +168,9 @@ public void Set (params object[] fields) {
|
|||||||
throw new ArgumentException ();
|
throw new ArgumentException ();
|
||||||
|
|
||||||
for (i = 0; i < length; i += 2) {
|
for (i = 0; i < length; i += 2) {
|
||||||
|
if (fields[i].GetType () != typeof (string))
|
||||||
|
throw new ArgumentException ();
|
||||||
|
|
||||||
SetValue (fields[i] as string, new GLib.Value (fields[i+1]));
|
SetValue (fields[i] as string, new GLib.Value (fields[i+1]));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user