glib: In Value.Update, check if val is null before updating
Signed-off-by: Bertrand Lorentz <bertrand.lorentz@gmail.com>
This commit is contained in:
parent
324fc7b0e3
commit
69ea133855
1 changed files with 1 additions and 1 deletions
|
@ -573,7 +573,7 @@ namespace GLib {
|
||||||
|
|
||||||
internal void Update (object val)
|
internal void Update (object val)
|
||||||
{
|
{
|
||||||
if (GType.Is (type, GType.Boxed) && !(val is IWrapper)) {
|
if (GType.Is (type, GType.Boxed) && val != null && !(val is IWrapper)) {
|
||||||
MethodInfo mi = val.GetType ().GetMethod ("Update", BindingFlags.NonPublic | BindingFlags.Instance);
|
MethodInfo mi = val.GetType ().GetMethod ("Update", BindingFlags.NonPublic | BindingFlags.Instance);
|
||||||
IntPtr boxed_ptr = g_value_get_boxed (ref this);
|
IntPtr boxed_ptr = g_value_get_boxed (ref this);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue