[spice-gtk v4 13/15] channel: avoid crash on spice_channel_wakeup due NULL channel

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



---
 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..61ab15c 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(SPICE_IS_CHANNEL(channel));
+    c = &channel->priv->coroutine;
 
     if (cancel)
         g_coroutine_condition_cancel(c);
-- 
2.5.5

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]