From e7a3be99946f228583a0718668df66a84ddbf2c1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jean-Philippe=20Bruy=C3=A8re?= Date: Wed, 1 Mar 2017 07:02:36 +0100 Subject: [PATCH] debug instantiator: cancel also 2 sided binding if new ds is null --- src/Instantiator.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Instantiator.cs b/src/Instantiator.cs index e0800478..107eb5a3 100644 --- a/src/Instantiator.cs +++ b/src/Instantiator.cs @@ -804,6 +804,7 @@ namespace Crow il.DeclareLocal (CompilerServices.TObject);//used for checking propery less bindings il.DeclareLocal (typeof(MemberInfo));//used for checking propery less bindings System.Reflection.Emit.Label cancel = il.DefineLabel (); + System.Reflection.Emit.Label newDSIsNull = il.DefineLabel (); System.Reflection.Emit.Label cancelInit = il.DefineLabel (); il.Emit (OpCodes.Nop); @@ -830,7 +831,7 @@ namespace Crow } il.Emit (OpCodes.Ldarg_2);//load datasource change arg il.Emit (OpCodes.Ldfld, CompilerServices.fiDSCNewDS); - il.Emit (OpCodes.Brfalse, cancel);//new ds is null + il.Emit (OpCodes.Brfalse, newDSIsNull);//new ds is null } #region fetch initial Value @@ -882,6 +883,7 @@ namespace Crow } } + il.MarkLabel (newDSIsNull); il.Emit (OpCodes.Ret); //store dschange delegate in instatiator instance for access while instancing graphic object -- 2.47.3