diff options
author | Xan Lopez <xan@gnome.org> | 2009-07-31 22:47:38 +0300 |
---|---|---|
committer | Xan Lopez <xan@gnome.org> | 2009-07-31 22:47:38 +0300 |
commit | c2f5020c71cad4c826288ae755c200d1fdf7d174 (patch) | |
tree | 5f61bc124728509f6945e7aa507d299ca4cfda6a /libsoup | |
parent | c204f620fa05c9e623091f16cfa34350431a5a7b (diff) | |
download | libsoup-c2f5020c71cad4c826288ae755c200d1fdf7d174.tar.gz |
soup-cache: only close the stream if we ever managed to open one
Diffstat (limited to 'libsoup')
-rw-r--r-- | libsoup/soup-cache.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/libsoup/soup-cache.c b/libsoup/soup-cache.c index eccb4a5e..976bef17 100644 --- a/libsoup/soup-cache.c +++ b/libsoup/soup-cache.c @@ -472,11 +472,12 @@ msg_got_body_cb (SoupMessage *msg, SoupCacheEntry *entry) return; } - g_output_stream_close_async (entry->stream, - G_PRIORITY_DEFAULT, - NULL, - (GAsyncReadyCallback)close_ready_cb, - entry); + if (entry->stream) + g_output_stream_close_async (entry->stream, + G_PRIORITY_DEFAULT, + NULL, + (GAsyncReadyCallback)close_ready_cb, + entry); } static void |