buildertool: Fix a possible crash

We need to call g_markup_parse_context_end_parse
to catch incomplete documents that we might not
handle well later.
This commit is contained in:
Matthias Clasen 2021-12-13 13:52:50 -05:00
parent 51a72a9c53
commit 5222dc0cd1

View File

@ -2295,6 +2295,12 @@ simplify_file (const char *filename,
return FALSE;
}
if (!g_markup_parse_context_end_parse (context, &error))
{
g_printerr (_("Can't parse “%s”: %s\n"), filename, error->message);
return FALSE;
}
data.builder = gtk_builder_new ();
if (data.convert3to4)