[Spice-devel] [PATCH spice-gtk] Fix crash when closing while recording
Hans de Goede
hdegoede at redhat.com
Fri Apr 6 00:51:19 PDT 2012
ACk.
On 04/06/2012 04:08 AM, Marc-André Lureau wrote:
> First notify about disconnection before resetting the channel data.
> An audio recording task might expect the channel to be in a ready
> state otherwise, for example.
>
> https://bugzilla.redhat.com/show_bug.cgi?id=810247
> ---
> gtk/spice-channel.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/gtk/spice-channel.c b/gtk/spice-channel.c
> index 783b94a..b0f2d4e 100644
> --- a/gtk/spice-channel.c
> +++ b/gtk/spice-channel.c
> @@ -2411,11 +2411,11 @@ static void channel_disconnect(SpiceChannel *channel)
>
> c->has_error = TRUE; /* break the loop */
>
> - spice_channel_reset(channel, FALSE);
> -
> if (c->state == SPICE_CHANNEL_STATE_READY)
> emit_main_context(channel, SPICE_CHANNEL_EVENT, SPICE_CHANNEL_CLOSED);
>
> + spice_channel_reset(channel, FALSE);
> +
> g_return_if_fail(SPICE_IS_CHANNEL(channel));
> c->state = SPICE_CHANNEL_STATE_UNCONNECTED;
> }
More information about the Spice-devel
mailing list