mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-04-21 14:49:16 +02:00
girepository/compiler: Cleanup the parser on write failures
This commit is contained in:
parent
416bab52eb
commit
cc070e1a7d
@ -229,6 +229,7 @@ main (int argc, char **argv)
|
|||||||
|
|
||||||
{
|
{
|
||||||
GITypelib *typelib = NULL;
|
GITypelib *typelib = NULL;
|
||||||
|
int write_successful;
|
||||||
|
|
||||||
if (shlibs)
|
if (shlibs)
|
||||||
{
|
{
|
||||||
@ -246,10 +247,14 @@ main (int argc, char **argv)
|
|||||||
g_error (_("Invalid typelib for module ‘%s’: %s"),
|
g_error (_("Invalid typelib for module ‘%s’: %s"),
|
||||||
module->name, error->message);
|
module->name, error->message);
|
||||||
|
|
||||||
if (!write_out_typelib (NULL, typelib))
|
write_successful = write_out_typelib (NULL, typelib);
|
||||||
return 1;
|
|
||||||
|
|
||||||
g_clear_pointer (&typelib, gi_typelib_unref);
|
g_clear_pointer (&typelib, gi_typelib_unref);
|
||||||
|
|
||||||
|
if (!write_successful)
|
||||||
|
{
|
||||||
|
gi_ir_parser_free (parser);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
g_debug ("[building] done");
|
g_debug ("[building] done");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user