mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-27 07:56:14 +01:00
parser: prevents a segfault when _g_ir_parser_parse_string returns NULL error was not set.
Noticed the segmentation fault while using Vala to generate a .gir, a bug has been filed tomake sure Vala doesn't export gir symbols outside of a namespace (see https://bugzilla.gnome.org/show_bug.cgi?id=661952) https://bugzilla.gnome.org/show_bug.cgi?id=661951
This commit is contained in:
parent
b75e788785
commit
c87a386cd1
@ -3502,6 +3502,11 @@ _g_ir_parser_parse_string (GIrParser *parser,
|
||||
|
||||
if (ctx.modules)
|
||||
return ctx.modules->data;
|
||||
|
||||
g_set_error (error,
|
||||
G_MARKUP_ERROR,
|
||||
G_MARKUP_ERROR_INVALID_CONTENT,
|
||||
"Expected namespace element in the gir file");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user