From 55df427fab9470580a605a60166a0a516d9fc358 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sebastian=20Dr=C3=B6ge?= Date: Mon, 20 Apr 2009 20:53:01 +0200 Subject: [PATCH] Make sure that every second parameter to Structure.Add(...) is a string --- gstreamer-sharp/Structure.custom | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gstreamer-sharp/Structure.custom b/gstreamer-sharp/Structure.custom index a773b30..ad63559 100644 --- a/gstreamer-sharp/Structure.custom +++ b/gstreamer-sharp/Structure.custom @@ -168,6 +168,9 @@ public void Set (params object[] fields) { throw new ArgumentException (); 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])); } } -- 2.7.4