From: Marco Trevisan (TreviƱo) Date: Tue, 30 May 2023 15:42:59 +0000 (+0200) Subject: gtkselectioninputstream-x11: Do not add EOF marker twice to the chunks queue X-Git-Tag: archive/raspbian/4.12.3+ds-1+rpi1~1^2^2^2~22^2~3^2~1^2~16 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=f02b739f4c47d1536f55bad7532b08e8f42108ef;p=gtk4.git 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. --- 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)