summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2023-10-30 12:13:55 +0100
committerSébastien Helleu <flashcode@flashtux.org>2023-10-30 23:10:54 +0100
commit23289dcb2c8e85b395b8a217d0c718a4be48034e (patch)
tree3c67014a08e19613903b86c41efa837067ad91fd /src/core
parent81b31d9e6c3e71375df1879885b5d2a00c10543e (diff)
downloadweechat-23289dcb2c8e85b395b8a217d0c718a4be48034e.zip
core: fix use NULL pointer when a config file has no options
Diffstat (limited to 'src/core')
-rw-r--r--src/core/wee-doc.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/core/wee-doc.c b/src/core/wee-doc.c
index c6f008b74..dd84a8ece 100644
--- a/src/core/wee-doc.c
+++ b/src/core/wee-doc.c
@@ -598,10 +598,13 @@ doc_gen_user_options (const char *path, const char *lang)
free (default_value);
}
- string_fprintf (
- file,
- "// end::%s_options[]\n",
- old_config->name);
+ if (old_config)
+ {
+ string_fprintf (
+ file,
+ "// end::%s_options[]\n",
+ old_config->name);
+ }
arraylist_free (list_options);