Skip to content

Commit

Permalink
Fix possible NRE with Graphics.CurrentTransform
Browse files Browse the repository at this point in the history
  • Loading branch information
cwensley committed May 2, 2021
1 parent 12d0e36 commit b729d5c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Eto.Wpf/Drawing/GraphicsHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,7 @@ public void RestoreTransform()

public IMatrix CurrentTransform
{
get { return transforms.Current != null ? transforms.Current.Clone() : Matrix.Create(); }
get { return transforms?.Current?.Clone() ?? Matrix.Create(); }
}

void RewindOffset()
Expand Down

0 comments on commit b729d5c

Please sign in to comment.