From: jpbruyere Date: Mon, 14 Sep 2015 14:49:13 +0000 (+0200) Subject: dont load image if path is null X-Git-Tag: 0.2~22 X-Git-Url: https://git.osiis.dedyn.io/?a=commitdiff_plain;h=6d3c24171a10c55a748657181ecd269f13829f7f;p=jp%2Fcrow.git dont load image if path is null --- diff --git a/src/GraphicObjects/Image.cs b/src/GraphicObjects/Image.cs index 587ca20d..10631835 100755 --- a/src/GraphicObjects/Image.cs +++ b/src/GraphicObjects/Image.cs @@ -21,6 +21,10 @@ namespace go get { return _pic == null ? null : _pic.Path; } set { try { + if (string.IsNullOrEmpty(value)){ + _pic = null; + return; + } LoadImage (value); _pic.KeepProportions = true; } catch (Exception ex) {