Browse Source
Fix the name of font family is null cause crash. #12190 (#16677)
Co-authored-by: jianwenlong <jian-wenlong@rui-hai.com>
pull/17021/head
Jerry Jian
1 year ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
1 additions and
1 deletions
-
src/Avalonia.Base/Media/Typeface.cs
|
|
|
@ -48,7 +48,7 @@ namespace Avalonia.Media |
|
|
|
FontStyle style = FontStyle.Normal, |
|
|
|
FontWeight weight = FontWeight.Normal, |
|
|
|
FontStretch stretch = FontStretch.Normal) |
|
|
|
: this(new FontFamily(fontFamilyName), style, weight, stretch) |
|
|
|
: this(fontFamilyName == null ? FontFamily.Default : new FontFamily(fontFamilyName), style, weight, stretch) |
|
|
|
{ |
|
|
|
} |
|
|
|
|
|
|
|
|