From 9cb7935ce4449e29c2f5dec76bb48ce09e3a0c5f Mon Sep 17 00:00:00 2001 From: Caeden Statia Date: Fri, 7 Feb 2020 15:41:01 -0800 Subject: [PATCH] Added try catch when initially loading theme --- ModAssistant/MainWindow.xaml.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/ModAssistant/MainWindow.xaml.cs b/ModAssistant/MainWindow.xaml.cs index a4609a6..a1881e1 100644 --- a/ModAssistant/MainWindow.xaml.cs +++ b/ModAssistant/MainWindow.xaml.cs @@ -61,7 +61,14 @@ namespace ModAssistant } Themes.LoadThemes(); - Themes.ApplyTheme("Light", this); + try + { + Themes.ApplyTheme("Light", this); + }catch (ArgumentException) + { + Themes.ApplyTheme("Light", this); + MainText = "Theme not found, reverting to Light theme..."; + } List versions; string json = string.Empty;