Only call flush if non-null.

2007-12-04  Alexander Larsson  <alexl@redhat.com>

        * goutputstream.c:
        (g_output_stream_close):
	Only call flush if non-null.


svn path=/trunk/; revision=6040
This commit is contained in:
Alexander Larsson 2007-12-04 10:44:49 +00:00 committed by Alexander Larsson
parent 117de38f04
commit 74e95b90d2
2 changed files with 10 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2007-12-04 Alexander Larsson <alexl@redhat.com>
* goutputstream.c:
(g_output_stream_close):
Only call flush if non-null.
2007-11-30 Dan Winship <danw@gnome.org>
* ginputstream.c (g_input_stream_set_pending): Make this take a

View File

@ -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)
{