Skip to content

Commit

Permalink
Merge pull request #95 from lukas-kirschner/master
Browse files Browse the repository at this point in the history
Fixed missing Null check causing NullPointerExceptions when an SVG image is placed inside a DataGridCheckBoxColumn
  • Loading branch information
jogibear9988 authored Mar 27, 2024
2 parents eb6eff9 + fc1ec4a commit a88feb6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Source/SVGImage/SVG/SVGImage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit a88feb6

Please sign in to comment.