Skip to content

Commit

Permalink
Merge pull request #21 from zacharied/fix.cli-dpi
Browse files Browse the repository at this point in the history
Fix crash when converting chart with SvgString on CLI
  • Loading branch information
MikiraSora authored Oct 27, 2024
2 parents a94b0e7 + 52fc12a commit d4ceadc
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public void RebuildSvgContent()
brush.Freeze();
var pen = new Pen(brush, 1);
pen.Freeze();
var dpiInfo = VisualTreeHelper.GetDpi(Application.Current.MainWindow);
var dpiInfo = Application.Current.MainWindow is not null ? VisualTreeHelper.GetDpi(Application.Current.MainWindow) : new();

var direction = ContentFlowDirection switch
{
Expand Down

0 comments on commit d4ceadc

Please sign in to comment.