]> O.S.I.I.S - jp/crow.git/commitdiff
debug instantiator: cancel also 2 sided binding if new ds is null
authorJean-Philippe Bruyère <jp_bruyere@hotmail.com>
Wed, 1 Mar 2017 06:02:36 +0000 (07:02 +0100)
committerJean-Philippe Bruyère <jp_bruyere@hotmail.com>
Wed, 1 Mar 2017 06:02:36 +0000 (07:02 +0100)
src/Instantiator.cs

index e080047845062f76e1ca239971dc9069e0755dff..107eb5a37d3c2776b48b7c0ba63cd114d37f19f5 100644 (file)
@@ -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