diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2012-03-14 14:59:46 +0100 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2012-03-14 15:29:56 +0100 |
commit | bcb88cede5edb232ac87235d957c023a0397bd5e (patch) | |
tree | 2522fb8d1a31cf9421b245ecc05747dde9e72010 /xps/xps_resource.c | |
parent | 621e33bdb921bdc3ccd9068101acd3858c9c14c8 (diff) | |
download | mupdf-bcb88cede5edb232ac87235d957c023a0397bd5e.tar.xz |
Miscellaneous fixes for XPS from SumatraPDf.
Diffstat (limited to 'xps/xps_resource.c')
-rw-r--r-- | xps/xps_resource.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/xps/xps_resource.c b/xps/xps_resource.c index aa3cdc75..845bea6c 100644 --- a/xps/xps_resource.c +++ b/xps/xps_resource.c @@ -67,6 +67,9 @@ xps_parse_remote_resource_dictionary(xps_document *doc, char *base_uri, char *so xml = xml_parse_document(doc->ctx, part->data, part->size); xps_free_part(doc, part); + if (!xml) + return NULL; + if (strcmp(xml_tag(xml), "ResourceDictionary")) { xml_free_element(doc->ctx, xml); @@ -118,8 +121,6 @@ xps_parse_resource_dictionary(xps_document *doc, char *base_uri, xml_element *ro if (head) head->base_uri = fz_strdup(doc->ctx, base_uri); - else - fz_warn(doc->ctx, "empty resource dictionary"); return head; } |