mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-22 08:17:01 +00:00
Make sure that every second parameter to Structure.Add(...) is a string
This commit is contained in:
parent
7fb126bfd1
commit
55df427fab
1 changed files with 3 additions and 0 deletions
|
@ -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…
Reference in a new issue