Browse Source

fix #15873, prevent FontFamily Property was null and crash the whole application (#15896)

* fix #15873

* fix: FontFamily wrong assignment

* Revert extra whitespaces

---------

Co-authored-by: Benedikt Stebner <Gillibald@users.noreply.github.com>
pull/16338/head
Acoris 2 years ago
committed by GitHub
parent
commit
b865cc41c4
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 2
      src/Avalonia.Base/Media/Typeface.cs

2
src/Avalonia.Base/Media/Typeface.cs

@ -31,7 +31,7 @@ namespace Avalonia.Media
throw new ArgumentException("Font stretch must be > 1.");
}
FontFamily = fontFamily;
FontFamily = fontFamily ?? FontFamily.Default;
Style = style;
Weight = weight;
Stretch = stretch;

Loading…
Cancel
Save