From 23289dcb2c8e85b395b8a217d0c718a4be48034e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Mon, 30 Oct 2023 12:13:55 +0100 Subject: core: fix use NULL pointer when a config file has no options --- src/core/wee-doc.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src/core') 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); -- cgit v1.2.3