diff --git a/server/cursor-channel.c b/server/cursor-channel.c index fa2ddf83..138a0bd6 100644 --- a/server/cursor-channel.c +++ b/server/cursor-channel.c @@ -348,7 +348,9 @@ cursor_channel_connect(CursorChannel *cursor, RedClient *client, RedStream *stre ccc = cursor_channel_client_new(cursor, client, stream, migrate, caps); - spice_return_if_fail(ccc != NULL); + if (ccc == NULL) { + return; + } RedChannelClient *rcc = RED_CHANNEL_CLIENT(ccc); red_channel_client_ack_zero_messages_window(rcc); diff --git a/server/stream-channel.c b/server/stream-channel.c index 9841ff66..1d71c126 100644 --- a/server/stream-channel.c +++ b/server/stream-channel.c @@ -441,7 +441,9 @@ stream_channel_connect(RedChannel *red_channel, RedClient *red_client, RedStream spice_return_if_fail(stream != NULL); client = stream_channel_client_new(channel, red_client, stream, migration, caps); - spice_return_if_fail(client != NULL); + if (client == NULL) { + return; + } // request new stream start->num_codecs = stream_channel_get_supported_codecs(channel, start->codecs);