diff --git a/gdk/wayland/gdkcursor-wayland.c b/gdk/wayland/gdkcursor-wayland.c
index 35cf8cd..abe1cd4 100644
--- a/gdk/wayland/gdkcursor-wayland.c
+++ b/gdk/wayland/gdkcursor-wayland.c
@@ -353,7 +353,10 @@ _gdk_wayland_display_get_cursor_for_name_with_scale (GdkDisplay  *display,
     return GDK_CURSOR (private);
 
   if (!_gdk_wayland_cursor_update (display_wayland, private))
-    return GDK_CURSOR (private);
+    {
+      g_object_unref (private);
+      return NULL;
+    }
 
   /* Insert into cache. */
   g_hash_table_insert (display_wayland->cursor_cache,
