builderparser: Be more robust

If a document contains no useful content,
just say so instead of crashing.
This commit is contained in:
Matthias Clasen 2021-12-13 14:44:40 -05:00
parent e230c9c6f0
commit 5c1ad88137

View File

@ -2301,6 +2301,12 @@ simplify_file (const char *filename,
return FALSE;
}
if (data.root == NULL)
{
g_printerr (_("Can't parse “%s”\n"), filename);
return FALSE;
}
data.builder = gtk_builder_new ();
if (data.convert3to4)