From b76ffdcce297ef55330839ddfe3053163e3b9abb Mon Sep 17 00:00:00 2001 From: Christoph Reiter Date: Sun, 29 Jul 2018 15:40:31 +0200 Subject: g-ir-generate: fix missing error handling for command line parsing The error arg was used but the result never checked. --- tools/generate.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tools/generate.c b/tools/generate.c index 926ffcac..f35893c3 100644 --- a/tools/generate.c +++ b/tools/generate.c @@ -60,7 +60,12 @@ main (int argc, char *argv[]) context = g_option_context_new (""); g_option_context_add_main_entries (context, options, NULL); - g_option_context_parse (context, &argc, &argv, &error); + if (!g_option_context_parse (context, &argc, &argv, &error)) + { + g_fprintf (stderr, "failed to parse: %s\n", error->message); + g_error_free (error); + return 1; + } if (!input) { -- cgit v1.2.1