[Spice-devel] [spice-gtk v3 13/16] channel: avoid crash on spice_channel_wakeup due NULL channel
Pavel Grunt
pgrunt at redhat.com
Mon May 30 11:00:08 UTC 2016
Hi,
On Mon, 2016-05-30 at 11:55 +0200, Victor Toso wrote:
> ---
> src/spice-channel.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/src/spice-channel.c b/src/spice-channel.c
> index c555f75..8b159f4 100644
> --- a/src/spice-channel.c
> +++ b/src/spice-channel.c
> @@ -1891,7 +1891,10 @@ error:
> G_GNUC_INTERNAL
> void spice_channel_wakeup(SpiceChannel *channel, gboolean cancel)
> {
> - GCoroutine *c = &channel->priv->coroutine;
> + GCoroutine *c;
> +
> + g_return_if_fail (channel != NULL);
SPICE_IS_CHANNEL ? ;) and we are not using a space between a function name and
brackets
Pavel
> + c = &channel->priv->coroutine;
>
> if (cancel)
> g_coroutine_condition_cancel(c);
More information about the Spice-devel
mailing list