mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-22 00:06:36 +00:00
Throw an exception if an element can't be instantiated in element bindings
This commit is contained in:
parent
91945e2131
commit
9fa9c1b7d8
1 changed files with 2 additions and 0 deletions
|
@ -281,6 +281,8 @@ public class ElementGen {
|
|||
writer.WriteLine ("\t\t\tRaw = gst_element_factory_make (native_element, native_name);");
|
||||
writer.WriteLine ("\t\t\tGLib.Marshaller.Free (native_name);");
|
||||
writer.WriteLine ("\t\t\tGLib.Marshaller.Free (native_element);");
|
||||
writer.WriteLine ("\t\t\tif (Raw == IntPtr.Zero)");
|
||||
writer.WriteLine ("\t\t\t\tthrow new Exception (\"Failed to instantiate element \\\"" + ei.name + "\\\"\");");
|
||||
writer.WriteLine ("\t\t}\n");
|
||||
|
||||
writer.WriteLine ("\t\tpublic " + class_name + " () : this ((string) null) { }\n");
|
||||
|
|
Loading…
Reference in a new issue