summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Rasmussen <sebras@hotmail.com>2008-03-10 00:17:48 +0100
committerSebastian Rasmussen <sebras@hotmail.com>2008-03-10 00:17:48 +0100
commitb5ce90230e44450241500d66e68f89cc496c1f1a (patch)
tree908338c43832c3c92d064582b20ab0ea4224a765
parent33d22e85be3c4dc929273c5cce46ef0a46a8f790 (diff)
downloadmupdf-b5ce90230e44450241500d66e68f89cc496c1f1a.tar.xz
Propagate errors properly in shading and font code.
-rw-r--r--mupdf/pdf_fontfilems.c6
-rw-r--r--mupdf/pdf_shade4.c19
2 files changed, 14 insertions, 11 deletions
diff --git a/mupdf/pdf_fontfilems.c b/mupdf/pdf_fontfilems.c
index cf81db46..f37d8668 100644
--- a/mupdf/pdf_fontfilems.c
+++ b/mupdf/pdf_fontfilems.c
@@ -610,10 +610,10 @@ pdf_createfontlistMS()
removeredundancy(&fontlistMS);
-cleanup:
- if(err)
- fz_abort(err);
return nil;
+
+cleanup:
+ fz_abort(err);
}
void
diff --git a/mupdf/pdf_shade4.c b/mupdf/pdf_shade4.c
index 34290297..b1271166 100644
--- a/mupdf/pdf_shade4.c
+++ b/mupdf/pdf_shade4.c
@@ -158,9 +158,10 @@ pdf_loadtype4shade(fz_shade *shade, pdf_xref *xref, fz_obj *shading, fz_obj *ref
fz_dropbuffer(buf);
-cleanup:
-
return nil;
+
+cleanup:
+ return error;
}
static int
@@ -321,10 +322,10 @@ pdf_loadtype5shade(fz_shade *shade, pdf_xref *xref, fz_obj *shading, fz_obj *ref
fz_free(c[i]);
}
+ return nil;
cleanup:
-
- return nil;
+ return error;
}
#define SEGMENTATION_DEPTH 2
@@ -670,9 +671,10 @@ pdf_loadtype6shade(fz_shade *shade, pdf_xref *xref, fz_obj *shading, fz_obj *ref
shade->meshlen = j / n / 3;
-cleanup:
-
return nil;
+
+cleanup:
+ return error;
}
fz_error *
@@ -788,8 +790,9 @@ pdf_loadtype7shade(fz_shade *shade, pdf_xref *xref, fz_obj *shading, fz_obj *ref
shade->meshlen = j / n / 3;
-cleanup:
-
return nil;
+
+cleanup:
+ return error;
}