summaryrefslogtreecommitdiff
path: root/src/util
diff options
context:
space:
mode:
Diffstat (limited to 'src/util')
-rw-r--r--src/util/color_palette.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/util/color_palette.c b/src/util/color_palette.c
index fc26a10..09c3ae3 100644
--- a/src/util/color_palette.c
+++ b/src/util/color_palette.c
@@ -38,7 +38,7 @@ bool camu_color_palette_init(str *path)
{
#ifdef NAUNET_HAS_JSON
struct nn_file file;
- if (!nn_file_open(&file, path, NNWT_FILE_READONLY)) {
+ if (!nn_file_exists(path) || !nn_file_open(&file, path, NNWT_FILE_READONLY)) {
return false;
}