diff options
author | Kristian Høgsberg <krh@redhat.com> | 2006-06-14 19:25:37 -0400 |
---|---|---|
committer | Kristian Høgsberg <krh@redhat.com> | 2006-06-14 19:25:37 -0400 |
commit | dedc51ba51eaa61e4b11f274fac06c6f0acd8a87 (patch) | |
tree | 5571bd20fea77d32663a5b804a55fc8b119097f5 /src/cairo-output-stream.c | |
parent | 9ef99d10bb7eb6cde421e0d93ae55988882d9b56 (diff) |
Only call close function for output streams if it's non-NULL.
Diffstat (limited to 'src/cairo-output-stream.c')
-rw-r--r-- | src/cairo-output-stream.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/cairo-output-stream.c b/src/cairo-output-stream.c index 9ff939371..833c2a2a7 100644 --- a/src/cairo-output-stream.c +++ b/src/cairo-output-stream.c @@ -105,7 +105,10 @@ closure_close (cairo_output_stream_t *stream) cairo_output_stream_with_closure_t *stream_with_closure = (cairo_output_stream_with_closure_t *) stream; - return stream_with_closure->close_func (stream_with_closure->closure); + if (stream_with_closure->close_func != NULL) + return stream_with_closure->close_func (stream_with_closure->closure); + else + return CAIRO_STATUS_SUCCESS; } cairo_output_stream_t * |