[gobject-introspection] repository: Ensure error is set if we're parsing a malformed file
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gobject-introspection] repository: Ensure error is set if we're parsing a malformed file
- Date: Fri, 17 Feb 2012 16:50:20 +0000 (UTC)
commit 4fbb34bb0ea4a1d142052e62a29480c704550f8b
Author: Jean BrÃfort <jean brefort normalesup org>
Date: Fri Feb 17 11:48:35 2012 -0500
repository: Ensure error is set if we're parsing a malformed file
https://bugzilla.gnome.org/show_bug.cgi?id=661951
girepository/girparser.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/girepository/girparser.c b/girepository/girparser.c
index 041c65d..fa0de1f 100644
--- a/girepository/girparser.c
+++ b/girepository/girparser.c
@@ -3511,10 +3511,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");
+ if (error && *error == NULL)
+ g_set_error (error,
+ G_MARKUP_ERROR,
+ G_MARKUP_ERROR_INVALID_CONTENT,
+ "Expected namespace element in the gir file");
return NULL;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]