]> O.S.I.I.S - jp/crow.git/commitdiff
dont load image if path is null
authorjpbruyere <jp.bruyere@hotmail.com>
Mon, 14 Sep 2015 14:49:13 +0000 (16:49 +0200)
committerjpbruyere <jp.bruyere@hotmail.com>
Mon, 14 Sep 2015 14:49:13 +0000 (16:49 +0200)
src/GraphicObjects/Image.cs

index 587ca20dd9dcd9316f310319f909a4c24fa7ba89..10631835c5c02c2fd63139d8622ec71dda7d9d69 100755 (executable)
@@ -21,6 +21,10 @@ namespace go
                        get { return _pic == null ? null : _pic.Path; }\r
                        set {   \r
                                try {\r
+                                       if (string.IsNullOrEmpty(value)){\r
+                                               _pic = null;\r
+                                               return;\r
+                                       }\r
                                        LoadImage (value);\r
                                        _pic.KeepProportions = true;\r
                                } catch (Exception ex) {\r