[Spice-devel] [PATCH spice-gtk 13/16] channel-main: Don't call g_input_stream_close on a NULL stream
Christophe Fergeau
cfergeau at redhat.com
Tue Apr 9 02:46:16 PDT 2013
ACK.
On Fri, Mar 29, 2013 at 12:40:25PM +0100, Hans de Goede wrote:
> If we fail to open a file, task->file_stream will be NULL, so we should
> not call g_input_stream_close on it.
>
> Signed-off-by: Hans de Goede <hdegoede at redhat.com>
> ---
> gtk/channel-main.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/gtk/channel-main.c b/gtk/channel-main.c
> index c7ac12d..5a05651 100644
> --- a/gtk/channel-main.c
> +++ b/gtk/channel-main.c
> @@ -2591,6 +2591,11 @@ static void file_xfer_completed(SpiceFileXferTask *task, GError *error)
> if (task->pending)
> return;
>
> + if (!task->file_stream) {
> + file_xfer_close_cb(NULL, NULL, task);
> + return;
> + }
> +
> g_input_stream_close_async(G_INPUT_STREAM(task->file_stream),
> G_PRIORITY_DEFAULT,
> task->cancellable,
> --
> 1.8.1.4
>
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/spice-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/spice-devel/attachments/20130409/a592625c/attachment.pgp>
More information about the Spice-devel
mailing list