[Spice-devel] [spice-gtk v2 13/16] channel: avoid crash on spice_channel_wakupe due NULL channel
Pavel Grunt
pgrunt at redhat.com
Fri May 27 09:52:31 UTC 2016
On Fri, 2016-05-27 at 11:45 +0200, Victor Toso wrote:
> Hi,
>
> On Fri, May 27, 2016 at 11:37:17AM +0200, Pavel Grunt wrote:
> > Hi,
> >
> > Can you explain when this can happen? Is it related to your tests?
>
> 100% related to tests. I'm testing file-transfer without
> SpiceMainChannel set.
Aren't tests failing by default on critical messages?
Pavel
>
> >
> > On Mon, 2016-05-23 at 13:50 +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);
> > why not use SPICE_IS_CHANNEL() ?
>
> Because I did not really think about it, hehe :-)
> I'll fix it!
>
> >
> > > + c = &channel->priv->coroutine;
> > >
> > > if (cancel)
> > > g_coroutine_condition_cancel(c);
> >
> > Pavel
> >
>
> Thanks,
> toso
More information about the Spice-devel
mailing list