[Spice-devel] [PATCH spice-gtk 2/9] channel: remove useless precondition

Marc-André Lureau marcandre.lureau at redhat.com
Mon Feb 16 09:02:23 PST 2015


This precondition isn't useful, since the channel is already
dereferenced before, and I've never seen an idle callback not passing
the user_data correctly.
---
 gtk/spice-channel.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/gtk/spice-channel.c b/gtk/spice-channel.c
index faaaafe..100f272 100644
--- a/gtk/spice-channel.c
+++ b/gtk/spice-channel.c
@@ -2179,7 +2179,6 @@ static gboolean spice_channel_delayed_unref(gpointer data)
     SpiceChannelPrivate *c = channel->priv;
     gboolean was_ready = c->state == SPICE_CHANNEL_STATE_READY;
 
-    g_return_val_if_fail(channel != NULL, FALSE);
     CHANNEL_DEBUG(channel, "Delayed unref channel %p", channel);
 
     g_return_val_if_fail(c->coroutine.coroutine.exited == TRUE, FALSE);
-- 
2.1.0



More information about the Spice-devel mailing list