summaryrefslogtreecommitdiff
path: root/src/core/wee-config-file.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/wee-config-file.c')
-rw-r--r--src/core/wee-config-file.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/core/wee-config-file.c b/src/core/wee-config-file.c
index 941df4795..8bc734697 100644
--- a/src/core/wee-config-file.c
+++ b/src/core/wee-config-file.c
@@ -835,6 +835,9 @@ config_file_search_option (struct t_config_file *config_file,
struct t_config_option *ptr_option;
int rc;
+ if (!option_name)
+ return NULL;
+
if (section)
{
for (ptr_option = section->last_option; ptr_option;
@@ -889,6 +892,9 @@ config_file_search_section_option (struct t_config_file *config_file,
*section_found = NULL;
*option_found = NULL;
+ if (!option_name)
+ return;
+
if (section)
{
for (ptr_option = section->last_option; ptr_option;
@@ -953,6 +959,9 @@ config_file_search_with_string (const char *option_name,
if (pos_option_name)
*pos_option_name = NULL;
+ if (!option_name)
+ return;
+
ptr_config = NULL;
ptr_section = NULL;
ptr_option = NULL;