From: Alexandru DAMIAN <alexandru.dam...@intel.com> weston_config_parse may return NULL, leading to an ungraceful exit via SIGSEGV.
Adding a nice check that gracefully exits the compositor when the config.ini parsing failed. Signed-off-by: Alexandru DAMIAN <alexandru.dam...@intel.com> --- src/compositor.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/compositor.c b/src/compositor.c index f619f82..9ba6e88 100644 --- a/src/compositor.c +++ b/src/compositor.c @@ -3489,6 +3489,10 @@ int main(int argc, char *argv[]) } config = weston_config_parse("weston.ini"); + if (config == NULL) { + weston_log("Could not parse config file weston.ini"); + exit(EXIT_FAILURE); + } weston_log("Using config file '%s'\n", weston_config_get_full_path(config)); section = weston_config_get_section(config, "core", NULL, NULL); -- 1.8.1.2 _______________________________________________ wayland-devel mailing list wayland-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/wayland-devel