diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2008-08-17 14:57:03 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2008-08-17 15:19:19 +0100 |
commit | 0549fcfd85bed5b03c9eb4502042f6ce6f76f5a0 (patch) | |
tree | 90f5cd290ac2a399ffa6b15660000cd6fd1b5686 /src/cairo-pdf-operators.c | |
parent | 96d45cfeeeb6dba94f134589486b894eeac82651 (diff) | |
download | cairo-0549fcfd85bed5b03c9eb4502042f6ce6f76f5a0.tar.gz |
[pdf-operators] Propagate status from end_text().
Check for an error status after end_text().
Diffstat (limited to 'src/cairo-pdf-operators.c')
-rw-r--r-- | src/cairo-pdf-operators.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/cairo-pdf-operators.c b/src/cairo-pdf-operators.c index 027bbad3d..472937537 100644 --- a/src/cairo-pdf-operators.c +++ b/src/cairo-pdf-operators.c @@ -683,15 +683,18 @@ _cairo_pdf_operators_emit_stroke (cairo_pdf_operators_t *pdf_operators, cairo_stroke_style_t *style, cairo_matrix_t *ctm, cairo_matrix_t *ctm_inverse, - const char *pdf_operator) + const char *pdf_operator) { cairo_status_t status; cairo_matrix_t m, path_transform; cairo_bool_t has_ctm = TRUE; double scale = 1.0; - if (pdf_operators->in_text_object) + if (pdf_operators->in_text_object) { status = _cairo_pdf_operators_end_text (pdf_operators); + if (status) + return status; + } /* Optimize away the stroke ctm when it does not affect the * stroke. There are other ctm cases that could be optimized @@ -788,8 +791,11 @@ _cairo_pdf_operators_fill (cairo_pdf_operators_t *pdf_operators, const char *pdf_operator; cairo_status_t status; - if (pdf_operators->in_text_object) + if (pdf_operators->in_text_object) { status = _cairo_pdf_operators_end_text (pdf_operators); + if (status) + return status; + } status = _cairo_pdf_operators_emit_path (pdf_operators, path, |