summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@redhat.com>2006-06-14 19:25:37 -0400
committerKristian Høgsberg <krh@redhat.com>2006-06-14 19:25:37 -0400
commitdedc51ba51eaa61e4b11f274fac06c6f0acd8a87 (patch)
tree5571bd20fea77d32663a5b804a55fc8b119097f5 /src
parent9ef99d10bb7eb6cde421e0d93ae55988882d9b56 (diff)
Only call close function for output streams if it's non-NULL.
Diffstat (limited to 'src')
-rw-r--r--src/cairo-output-stream.c5
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 *