g-ir-generate: fix missing error handling for command line parsing

The error arg was used but the result never checked.
This commit is contained in:
Christoph Reiter 2018-07-29 15:40:31 +02:00 committed by Philip Withnall
parent ea917797bb
commit d70551e624

View File

@ -60,7 +60,12 @@ main (int argc, char *argv[])
context = g_option_context_new (""); context = g_option_context_new ("");
g_option_context_add_main_entries (context, options, NULL); 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) if (!input)
{ {