[Spice-devel] [spice-gtk v1] spice-widget: remove old warning

Victor Toso victortoso at redhat.com
Wed Apr 4 15:31:11 UTC 2018


From: Victor Toso <me at victortoso.com>

This log was introduced in 13f5ebbf07a3 to track the situation where
the GdkCursor pointer would be invalid/NULL. That was possible if the
caller passed a NULL for rgba pointer in cursor_set().

Code has changed a bit since then it isn't necessary to log a warn in
the unlikely event of cursor_shape being NULL.

Signed-off-by: Victor Toso <victortoso at redhat.com>
Reported-by: Frediano Ziglio <fziglio at redhat.com>
---
 src/spice-widget.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/src/spice-widget.c b/src/spice-widget.c
index 8a6b5ab..29688ab 100644
--- a/src/spice-widget.c
+++ b/src/spice-widget.c
@@ -2652,7 +2652,6 @@ static void cursor_set(SpiceCursorChannel *channel,
 
     g_object_get(G_OBJECT(channel), "cursor", &cursor_shape, NULL);
     if (G_UNLIKELY(cursor_shape == NULL || cursor_shape->data == NULL)) {
-        g_warn_if_reached();
         if (cursor_shape != NULL) {
             g_boxed_free(SPICE_TYPE_CURSOR_SHAPE, cursor_shape);
         }
-- 
2.16.2



More information about the Spice-devel mailing list