mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-03-30 20:33:08 +02:00
repository: Ensure error is set if we're parsing a malformed file
https://bugzilla.gnome.org/show_bug.cgi?id=661951
This commit is contained in:
parent
a714bef965
commit
4359a037db
@ -3511,10 +3511,11 @@ _g_ir_parser_parse_string (GIrParser *parser,
|
|||||||
if (ctx.modules)
|
if (ctx.modules)
|
||||||
return ctx.modules->data;
|
return ctx.modules->data;
|
||||||
|
|
||||||
g_set_error (error,
|
if (error && *error == NULL)
|
||||||
G_MARKUP_ERROR,
|
g_set_error (error,
|
||||||
G_MARKUP_ERROR_INVALID_CONTENT,
|
G_MARKUP_ERROR,
|
||||||
"Expected namespace element in the gir file");
|
G_MARKUP_ERROR_INVALID_CONTENT,
|
||||||
|
"Expected namespace element in the gir file");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user