diff options
| author | jpbruyere <jp.bruyere@hotmail.com> | 2016-03-13 23:35:04 +0100 |
|---|---|---|
| committer | jpbruyere <jp.bruyere@hotmail.com> | 2016-03-13 23:35:04 +0100 |
| commit | 09e26d9c08d22f31e1164237d63e2757822ff5d6 (patch) | |
| tree | a29c9707bb117c5d64e89277381560426fbcaa77 /src/CompilerServices | |
| parent | 504927449716512140b87cd582a732968a621105 (diff) | |
test datasource null in bindings
Diffstat (limited to 'src/CompilerServices')
| -rw-r--r-- | src/CompilerServices/CompilerServices.cs | 5 |
1 files changed, 4 insertions, 1 deletions
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; } |