[librsvg: 2/10] rsvg_load_handle_xml_xinclude(): use the error code from xmlParseDocument
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg: 2/10] rsvg_load_handle_xml_xinclude(): use the error code from xmlParseDocument
- Date: Thu, 22 Nov 2018 20:21:42 +0000 (UTC)
commit 833587364cf4d33478337690753d6ee160696a89
Author: Federico Mena Quintero <federico gnome org>
Date: Thu Nov 22 08:40:37 2018 -0600
rsvg_load_handle_xml_xinclude(): use the error code from xmlParseDocument
librsvg/rsvg-load.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/librsvg/rsvg-load.c b/librsvg/rsvg-load.c
index 127bc4b7..2a5c8975 100644
--- a/librsvg/rsvg-load.c
+++ b/librsvg/rsvg-load.c
@@ -278,6 +278,8 @@ rsvg_load_handle_xml_xinclude (RsvgHandle *handle, const char *url)
g_free (mime_type);
if (stream) {
+ gboolean success = FALSE;
+
xml_parser = create_xml_stream_parser (handle->priv->load,
stream,
NULL, /* cancellable */
@@ -286,14 +288,14 @@ rsvg_load_handle_xml_xinclude (RsvgHandle *handle, const char *url)
g_object_unref (stream);
if (xml_parser) {
- (void) xmlParseDocument (xml_parser);
+ success = xmlParseDocument (xml_parser) == 0;
xml_parser = free_xml_parser_and_doc (xml_parser);
}
g_clear_error (&err);
- return TRUE;
+ return success;
} else {
return FALSE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]