Skip to content

Commit

Permalink
Fixed LoadJsonTheme() issue
Browse files Browse the repository at this point in the history
This fixes a crash when the "vicon.theme.json" does not exist.
  • Loading branch information
jjcarrier committed Jan 21, 2025
1 parent a75c115 commit c94c9ee
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app/TUI/JsonTheme.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c94c9ee

Please sign in to comment.