From 09e26d9c08d22f31e1164237d63e2757822ff5d6 Mon Sep 17 00:00:00 2001 From: jpbruyere Date: Sun, 13 Mar 2016 23:35:04 +0100 Subject: [PATCH] test datasource null in bindings --- src/CompilerServices/CompilerServices.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/CompilerServices/CompilerServices.cs b/src/CompilerServices/CompilerServices.cs index aea199f4..da5c0fe4 100644 --- a/src/CompilerServices/CompilerServices.cs +++ b/src/CompilerServices/CompilerServices.cs @@ -105,7 +105,10 @@ namespace Crow //if binding exp = '{}' => binding is done on datasource if (string.IsNullOrEmpty (Expression)) { - Source = new MemberReference ((Target.Instance as GraphicObject).DataSource); + Object o = (Target.Instance as GraphicObject).DataSource; + if (o == null) + return false; + Source = new MemberReference (o); return true; } -- 2.47.3