Browse Source
Merge pull request #10810 from timunie/fix/ThemeVariant_NRE
Attempt to fix possible NRE
pull/10828/head
Max Katz
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
2 additions and
1 deletions
-
src/Avalonia.Controls/TopLevel.cs
|
|
|
@ -459,7 +459,8 @@ namespace Avalonia.Controls |
|
|
|
} |
|
|
|
else if (change.Property == ActualThemeVariantProperty) |
|
|
|
{ |
|
|
|
PlatformImpl?.SetFrameThemeVariant((PlatformThemeVariant?)change.GetNewValue<ThemeVariant>() ?? PlatformThemeVariant.Light); |
|
|
|
var newThemeVariant = change.GetNewValue<ThemeVariant?>() ?? ThemeVariant.Default; |
|
|
|
PlatformImpl?.SetFrameThemeVariant((PlatformThemeVariant?)newThemeVariant ?? PlatformThemeVariant.Light); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|