diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2010-07-01 21:54:20 +0000 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2010-07-01 21:54:20 +0000 |
commit | efc6ef1419c770f7d104bba5f432f349f6bf0b6f (patch) | |
tree | 6aa648d0e3a974764e46b8021a341aa29f80c1a4 /xps/xpspage.c | |
parent | e84883085f9d3fd70eafd167515ad3e1e5394841 (diff) | |
download | ghostpdl-efc6ef1419c770f7d104bba5f432f349f6bf0b6f.tar.gz |
Return error code separately from NULL so we can handle empty resource dictionaries.
git-svn-id: http://svn.ghostscript.com/ghostscript/trunk@11478 a1074d23-0009-0410-80fe-cf8c14f379e6
Diffstat (limited to 'xps/xpspage.c')
-rw-r--r-- | xps/xpspage.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/xps/xpspage.c b/xps/xpspage.c index 5019638e9..59a562f4b 100644 --- a/xps/xpspage.c +++ b/xps/xpspage.c @@ -43,9 +43,9 @@ xps_parse_canvas(xps_context_t *ctx, char *base_uri, xps_resource_t *dict, xps_i { if (!strcmp(xps_tag(node), "Canvas.Resources") && xps_down(node)) { - new_dict = xps_parse_resource_dictionary(ctx, base_uri, xps_down(node)); - if (!new_dict) - return gs_rethrow(-1, "cannot load Canvas.Resources"); + code = xps_parse_resource_dictionary(ctx, &new_dict, base_uri, xps_down(node)); + if (code) + return gs_rethrow(code, "cannot load Canvas.Resources"); new_dict->parent = dict; dict = new_dict; } @@ -230,12 +230,12 @@ xps_parse_fixed_page(xps_context_t *ctx, xps_part_t *part) { if (!strcmp(xps_tag(node), "FixedPage.Resources") && xps_down(node)) { - dict = xps_parse_resource_dictionary(ctx, base_uri, xps_down(node)); - if (!dict) + code = xps_parse_resource_dictionary(ctx, &dict, base_uri, xps_down(node)); + if (code) { gs_pop_pdf14trans_device(ctx->pgs); gs_grestore(ctx->pgs); - return gs_rethrow(-1, "cannot load FixedPage.Resources"); + return gs_rethrow(code, "cannot load FixedPage.Resources"); } } code = xps_parse_element(ctx, base_uri, dict, node); |