From c94c9eedeec63aac512ec187fceba6b0af4a6ccb Mon Sep 17 00:00:00 2001 From: Jon Carrier Date: Tue, 21 Jan 2025 18:56:07 -0500 Subject: [PATCH] Fixed LoadJsonTheme() issue This fixes a crash when the "vicon.theme.json" does not exist. --- app/TUI/JsonTheme.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/TUI/JsonTheme.cs b/app/TUI/JsonTheme.cs index f2e359b..2593789 100644 --- a/app/TUI/JsonTheme.cs +++ b/app/TUI/JsonTheme.cs @@ -47,6 +47,11 @@ public static ColorTheme LoadJsonTheme() string themeFilePath = Path.Combine(exeDirectory, themeFilename); ColorTheme theme = ColorThemes.Classic; + if (!File.Exists(themeFilePath)) + { + return theme; + } + using (StreamReader r = new StreamReader(themeFilePath)) { try