mirror of
https://github.com/Ryujinx/GtkSharp.git
synced 2024-12-22 20:05:41 +00:00
Handle NULL in GLib.Value -> GLib.Variant cast operator
This commit is contained in:
parent
40773f3c88
commit
ed414df9f2
|
@ -275,9 +275,10 @@ namespace GLib {
|
|||
return GLib.Opaque.GetOpaque (g_value_get_boxed (ref val), (Type) new GType (val.type), false);
|
||||
}
|
||||
|
||||
public static explicit operator GLib.Variant (Value Val)
|
||||
public static explicit operator GLib.Variant (Value val)
|
||||
{
|
||||
return new Variant (g_value_get_variant (ref Val));
|
||||
IntPtr native_variant = g_value_get_variant (ref val);
|
||||
return native_variant == IntPtr.Zero ? null : new Variant (native_variant);
|
||||
}
|
||||
|
||||
public static explicit operator GLib.VariantType (Value val)
|
||||
|
|
Loading…
Reference in a new issue