mono / gtk-sharp

Gtk# is a Mono/.NET binding to the cross platform Gtk+ GUI toolkit and the foundation of most GUI apps built with Mono
http://www.mono-project.com/GtkSharp
Other
424 stars 140 forks source link

ValueArray: Create copy when receiving pointer #260

Closed ocrete closed 5 years ago

ocrete commented 5 years ago

The "ref" operation of GValueArray is a copy, so we don't have a choice.

I can reproduce the crash with GStreamer, but the code code to do it is:

GLib.ValueArray va = new GLib.ValueArray (1);
GLib.Value v = new GLib.Value (va);
GLib.ValueArray va2 = (GLib.ValueArray) v;
Therzok commented 5 years ago

Thanks!