diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2023-10-30 12:13:55 +0100 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2023-10-30 23:10:54 +0100 |
commit | 23289dcb2c8e85b395b8a217d0c718a4be48034e (patch) | |
tree | 3c67014a08e19613903b86c41efa837067ad91fd /src/core | |
parent | 81b31d9e6c3e71375df1879885b5d2a00c10543e (diff) | |
download | weechat-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.c | 11 |
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); |