From: Jean-Philippe Bruyère Date: Wed, 1 Mar 2017 06:02:36 +0000 (+0100) Subject: debug instantiator: cancel also 2 sided binding if new ds is null X-Git-Tag: v0.5.1~2 X-Git-Url: https://git.osiis.dedyn.io/?a=commitdiff_plain;h=e7a3be99946f228583a0718668df66a84ddbf2c1;p=jp%2Fcrow.git debug instantiator: cancel also 2 sided binding if new ds is null --- 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