diff --git a/shared/config-parser.c b/shared/config-parser.c index 7a19ea57a..eec3e9e9e 100644 --- a/shared/config-parser.c +++ b/shared/config-parser.c @@ -481,6 +481,9 @@ weston_config_next_section(struct weston_config *config, struct weston_config_section **section, const char **name) { + if (config == NULL) + return 0; + if (*section == NULL) *section = container_of(config->section_list.next, struct weston_config_section, link);