mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-10 02:40:11 +00:00
builderparser: Be more robust
If a document contains no useful content, just say so instead of crashing.
This commit is contained in:
parent
e230c9c6f0
commit
5c1ad88137
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user