[Spice-devel] [PATCH 08/23] server/red_worker: don't push to NULL channel (called from device input)
Alon Levy
alevy at redhat.com
Fri Feb 11 09:22:56 PST 2011
---
server/red_worker.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/server/red_worker.c b/server/red_worker.c
index e618cfa..cd02993 100644
--- a/server/red_worker.c
+++ b/server/red_worker.c
@@ -8351,13 +8351,16 @@ static void display_channel_send_item(RedChannel *base, PipeItem *pipe_item)
default:
red_error("invalid pipe item type");
}
- red_unref_channel((RedChannel *)display_channel);
+ red_unref_channel(&display_channel->common.base);
}
void red_channel_push(RedChannel *channel)
{
PipeItem *pipe_item;
+ if (!channel) {
+ return;
+ }
if (!channel->during_send) {
channel->during_send = TRUE;
} else {
--
1.7.4
More information about the Spice-devel
mailing list