mirror of
https://github.com/Ryujinx/GtkSharp.git
synced 2024-12-23 14:25:40 +00:00
Merge pull request #89 from knocte/master
glib: fix IntPtr.Zero being dereferenced in GLib.Value.ToBoxed()
This commit is contained in:
commit
859832f6e4
|
@ -414,6 +414,10 @@ namespace GLib {
|
|||
object ToBoxed ()
|
||||
{
|
||||
IntPtr boxed_ptr = g_value_get_boxed (ref this);
|
||||
|
||||
if (boxed_ptr == IntPtr.Zero)
|
||||
return null;
|
||||
|
||||
Type t = GType.LookupType (type);
|
||||
if (t == null)
|
||||
throw new Exception ("Unknown type " + new GType (type).ToString ());
|
||||
|
|
Loading…
Reference in a new issue