diff --git a/gio/ChangeLog b/gio/ChangeLog index 62e85b7b9..b9000fc52 100644 --- a/gio/ChangeLog +++ b/gio/ChangeLog @@ -1,3 +1,9 @@ +2007-12-04 Alexander Larsson + + * goutputstream.c: + (g_output_stream_close): + Only call flush if non-null. + 2007-11-30 Dan Winship * ginputstream.c (g_input_stream_set_pending): Make this take a diff --git a/gio/goutputstream.c b/gio/goutputstream.c index 458c33eea..62c75a6c8 100644 --- a/gio/goutputstream.c +++ b/gio/goutputstream.c @@ -518,7 +518,10 @@ g_output_stream_close (GOutputStream *stream, if (cancellable) g_push_current_cancellable (cancellable); - res = class->flush (stream, cancellable, error); + if (class->flush) + res = class->flush (stream, cancellable, error); + else + res = TRUE; if (!res) {