summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlon Levy <alevy@redhat.com>2010-11-08 10:44:20 +0200
committerAlon Levy <alevy@redhat.com>2011-03-02 17:27:50 +0200
commit724348ce4976d035227c659b84caa6223d789404 (patch)
tree00843eee003e08531b67e6952a8ebe6fb0bedcbd
parent705254b399e985272b60c639065aebe21a736eb7 (diff)
downloadspice-724348ce4976d035227c659b84caa6223d789404.tar.gz
spice-724348ce4976d035227c659b84caa6223d789404.tar.xz
spice-724348ce4976d035227c659b84caa6223d789404.zip
server/red_worker: don't push to NULL channel (called from device input)
-rw-r--r--server/red_worker.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/server/red_worker.c b/server/red_worker.c
index 57d67c15..a8c05519 100644
--- a/server/red_worker.c
+++ b/server/red_worker.c
@@ -8352,13 +8352,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 {