diff --git a/Source/SVGImage/SVG/SVGImage.cs b/Source/SVGImage/SVG/SVGImage.cs index b62fc8d..49923be 100644 --- a/Source/SVGImage/SVG/SVGImage.cs +++ b/Source/SVGImage/SVG/SVGImage.cs @@ -872,7 +872,7 @@ static void OnSizeTypeChanged(DependencyObject d, DependencyPropertyChangedEvent static void OnSourceChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { - var sourceUri = new Uri(e.NewValue.ToString(), UriKind.Relative); + var sourceUri = e.NewValue != null ? new Uri(e.NewValue.ToString(), UriKind.Relative) : null; var resource = e.NewValue != null ? Application.GetResourceStream(sourceUri) : null; ((SVGImage)d).SetImage(resource != null ? resource.Stream : null); }