about summary refs log tree commit diff stats
path: root/src/config
diff options
context:
space:
mode:
authorArtjom Vejsel <akawolf0@gmail.com>2022-04-02 19:07:59 +0300
committerArtjom Vejsel <akawolf0@gmail.com>2022-04-02 19:07:59 +0300
commit9c2713c9173397418cbb03ad7c63506a2566babf (patch)
tree4a4c761fbb69f8eebbe58b2c3250ce94a0ed2468 /src/config
parentcef0c5e927d51afaf89c308749602e68deb91afb (diff)
downloadprofani-tty-9c2713c9173397418cbb03ad7c63506a2566babf.tar.gz
disable execution of colors-changing code when call for theme load and it doesn't exist
Diffstat (limited to 'src/config')
-rw-r--r--src/config/theme.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/config/theme.c b/src/config/theme.c
index 9becc833..39f3d00c 100644
--- a/src/config/theme.c
+++ b/src/config/theme.c
@@ -184,6 +184,9 @@ theme_exists(const char* const theme_name)
 gboolean
 theme_load(const char* const theme_name, gboolean load_theme_prefs)
 {
+    if (!theme_exists(theme_name))
+        return FALSE;
+
     color_pair_cache_reset();
 
     if (_theme_load_file(theme_name)) {