From f02b739f4c47d1536f55bad7532b08e8f42108ef Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Tue, 30 May 2023 17:42:59 +0200 Subject: [PATCH] gtkselectioninputstream-x11: Do not add EOF marker twice to the chunks queue We were adding the same EOF marker two times back to the chunks queue, one implicitly, and the other time could happen when exiting the loop. --- gdk/x11/gdkselectioninputstream-x11.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gdk/x11/gdkselectioninputstream-x11.c b/gdk/x11/gdkselectioninputstream-x11.c index e6bc574409..7ea92ef368 100644 --- a/gdk/x11/gdkselectioninputstream-x11.c +++ b/gdk/x11/gdkselectioninputstream-x11.c @@ -89,7 +89,7 @@ gdk_x11_selection_input_stream_fill_buffer (GdkX11SelectionInputStream *stream, if (size == 0) { /* EOF marker, put it back */ - g_async_queue_push_front_unlocked (priv->chunks, bytes); + g_async_queue_push_front_unlocked (priv->chunks, g_steal_pointer (&bytes)); break; } else if (size > count) -- 2.30.2