summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorChristoph Reiter <reiter.christoph@gmail.com>2018-07-29 15:40:31 +0200
committerChristoph Reiter <reiter.christoph@gmail.com>2018-07-29 18:57:03 +0200
commitb76ffdcce297ef55330839ddfe3053163e3b9abb (patch)
tree59ef02b5dc7423511e45334132100a483e411ad6 /tools
parent54e8b9b96e4553b4a05e95612d0a91677e85f9e8 (diff)
downloadgobject-introspection-b76ffdcce297ef55330839ddfe3053163e3b9abb.tar.gz
g-ir-generate: fix missing error handling for command line parsing
The error arg was used but the result never checked.
Diffstat (limited to 'tools')
-rw-r--r--tools/generate.c7
1 files changed, 6 insertions, 1 deletions
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)
{