about summary refs log tree commit diff stats
path: root/src/config
diff options
context:
space:
mode:
authorMichael Vetter <jubalh@iodoru.org>2022-04-03 23:36:39 +0200
committerGitHub <noreply@github.com>2022-04-03 23:36:39 +0200
commit55cc76450b1ff8854e959df0e7a2d2c09d3aaef9 (patch)
treeee3c60cfbda7b37be1a480616f7472b22edb2b3f /src/config
parentdfa3ca344b1a53d5c7b1a3865056a836f2785fc3 (diff)
parent9c2713c9173397418cbb03ad7c63506a2566babf (diff)
downloadprofani-tty-55cc76450b1ff8854e959df0e7a2d2c09d3aaef9.tar.gz
Merge pull request #1681 from akaWolf/fix_theme_load_non_exist
Fix theme load

When we execute `/theme load somethingthatdoesntexist` it still loaded some colors wrongly.
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)) {