summaryrefslogtreecommitdiff
path: root/src/cairo-type1-fallback.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2008-02-29 10:16:05 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2008-03-04 09:31:20 +0000
commit3b93d90edde7c065c6484e03e056b8605af85c4d (patch)
tree5f274871750e617af1073c4b9bfc61e0fa34eade /src/cairo-type1-fallback.c
parent141c54cd276ae86f6677fa8f66a118264d4287bf (diff)
downloadcairo-3b93d90edde7c065c6484e03e056b8605af85c4d.tar.gz
[cairo-type1-fallback] Propagate original error status.
_cairo_error() has already been called at the originating error site, so remove the duplicate (hard-coded!) call at the return statement.
Diffstat (limited to 'src/cairo-type1-fallback.c')
-rw-r--r--src/cairo-type1-fallback.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/cairo-type1-fallback.c b/src/cairo-type1-fallback.c
index 0ca499869..219bd3977 100644
--- a/src/cairo-type1-fallback.c
+++ b/src/cairo-type1-fallback.c
@@ -78,6 +78,7 @@ cairo_type1_font_create (cairo_scaled_font_subset_t *scaled_font_subset,
cairo_matrix_t font_matrix;
cairo_matrix_t ctm;
cairo_font_options_t font_options;
+ cairo_status_t status;
font = calloc (1, sizeof (cairo_type1_font_t));
if (font == NULL)
@@ -106,7 +107,8 @@ cairo_type1_font_create (cairo_scaled_font_subset_t *scaled_font_subset,
&font_matrix,
&ctm,
&font_options);
- if (font->type1_scaled_font->status)
+ status = font->type1_scaled_font->status;
+ if (status)
goto fail;
_cairo_array_init (&font->contents, sizeof (unsigned char));
@@ -120,7 +122,7 @@ fail:
free (font->widths);
free (font);
- return _cairo_error (CAIRO_STATUS_NO_MEMORY);
+ return status;
}
/* Charstring commands. If the high byte is 0 the command is encoded
@@ -795,7 +797,7 @@ _cairo_type1_fallback_init_internal (cairo_type1_subset_t *type1_subset,
/* status is already set, ignore further errors */
cairo_type1_font_destroy (font);
- return _cairo_error (status);
+ return status;
}
cairo_status_t
@@ -886,7 +888,7 @@ fail2:
_cairo_type2_charstrings_fini (type2_subset);
fail1:
cairo_type1_font_destroy (font);
- return _cairo_error (status);
+ return status;
}
void