diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/cairo-output-stream.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/cairo-output-stream.c b/src/cairo-output-stream.c index 323bd0645..5bce0e343 100644 --- a/src/cairo-output-stream.c +++ b/src/cairo-output-stream.c @@ -166,6 +166,12 @@ _cairo_output_stream_destroy (cairo_output_stream_t *stream) if (stream == NULL) return _cairo_error (CAIRO_STATUS_NULL_POINTER); + if (stream == &_cairo_output_stream_nil || + stream == &_cairo_output_stream_nil_write_error) + { + return stream->status; + } + status = _cairo_output_stream_fini (stream); free (stream); |