diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2008-01-16 16:29:19 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2008-01-16 16:40:01 +0000 |
commit | 5cbc45488e276cb6e6ecfa7bc7dd4fae342de85e (patch) | |
tree | 672c700de47687c25c68cb22743c0a058e4b06d1 /src/cairo-base85-stream.c | |
parent | 2c10c7559db11ccf511e119f4d4fb2da97508786 (diff) | |
download | cairo-5cbc45488e276cb6e6ecfa7bc7dd4fae342de85e.tar.gz |
[cairo-output-stream] Introduce _cairo_output_stream_create_in_error()
Use a utility function to wrap an incoming error status into a new
error stream. As a side-effect, all error streams must be destroyed as
in the general case the caller can not distinguish between a static
error object and one allocated to hold an unusual error status.
Diffstat (limited to 'src/cairo-base85-stream.c')
-rw-r--r-- | src/cairo-base85-stream.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/cairo-base85-stream.c b/src/cairo-base85-stream.c index 97ef2635f..b7dc9b14b 100644 --- a/src/cairo-base85-stream.c +++ b/src/cairo-base85-stream.c @@ -113,6 +113,9 @@ _cairo_base85_stream_create (cairo_output_stream_t *output) { cairo_base85_stream_t *stream; + if (output->status) + return _cairo_output_stream_create_in_error (output->status); + stream = malloc (sizeof (cairo_base85_stream_t)); if (stream == NULL) { _cairo_error_throw (CAIRO_STATUS_NO_MEMORY); |