[Spice-commits] gtk/spice-channel.c
Marc-André Lureau
elmarco at kemper.freedesktop.org
Fri Apr 6 06:51:02 PDT 2012
gtk/spice-channel.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
New commits:
commit 452c42cb1e6155f348bde517e0d8771a8cf3985a
Author: Marc-André Lureau <marcandre.lureau at redhat.com>
Date: Fri Apr 6 04:05:11 2012 +0200
Fix crash when closing while recording
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
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-commits
mailing list