summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2021-09-27 23:23:01 +0200
committerSébastien Helleu <flashcode@flashtux.org>2021-09-27 23:23:01 +0200
commit9548a4cf747c54aac641544049a24fb1f270c14f (patch)
tree4fd53f33115784bc117c51b89905b578b2e82415 /src/core
parent301f0942c64d298cd83eb840e03121f33300747e (diff)
downloadweechat-9548a4cf747c54aac641544049a24fb1f270c14f.zip
core: check that option is not NULL in function config_file_option_value_to_string
Diffstat (limited to 'src/core')
-rw-r--r--src/core/wee-config-file.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/core/wee-config-file.c b/src/core/wee-config-file.c
index 014e06d71..de57a97d6 100644
--- a/src/core/wee-config-file.c
+++ b/src/core/wee-config-file.c
@@ -1748,6 +1748,9 @@ config_file_option_value_to_string (struct t_config_option *option,
const char *ptr_value;
int enabled, length;
+ if (!option)
+ return NULL;
+
if ((default_value && !option->default_value)
|| (!default_value && !option->value))
{