From: Alexander Larsson Date: Tue, 4 Dec 2007 10:44:49 +0000 (+0000) Subject: Only call flush if non-null. X-Git-Url: http://git.openbox.org/?a=commitdiff_plain;h=74e95b90d288ba2a5f513b508615869b98c80a66;p=dana%2Fcg-glib.git Only call flush if non-null. 2007-12-04 Alexander Larsson * goutputstream.c: (g_output_stream_close): Only call flush if non-null. svn path=/trunk/; revision=6040 --- diff --git a/gio/ChangeLog b/gio/ChangeLog index 62e85b7b..b9000fc5 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 458c33ee..62c75a6c 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) {