Skip to content

Commit 6810d03

Browse files
committed
Fix WPF preview not working
1 parent 4e832cd commit 6810d03

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

UndertaleModTool/Controls/System/TabControlDark.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public TabControlDark()
1818

1919
private void TabControlDark_Loaded(object sender, RoutedEventArgs e)
2020
{
21-
SetDarkMode(Settings.Instance.EnableDarkMode);
21+
SetDarkMode(Settings.Instance is not null ? Settings.Instance.EnableDarkMode : false);
2222
}
2323

2424
/// <inheritdoc/>

UndertaleModTool/Converters/IsVersionAtLeastConverter.cs

+2-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ public class IsVersionAtLeastConverter : IValueConverter
1616

1717
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
1818
{
19-
if (mainWindow.Data?.GeneralInfo is null
19+
if (mainWindow is null
20+
|| mainWindow.Data?.GeneralInfo is null
2021
|| parameter is not string verStr
2122
|| verStr.Length == 0)
2223
return Visibility.Hidden;

0 commit comments

Comments
 (0)