Merge branch 'wip/pwithnall/io-channel-double-close-source' into 'main'

tests: Fix a double-close of a GSource in tests

See merge request GNOME/glib!2658
This commit is contained in:
Sebastian Dröge 2022-05-17 07:22:41 +00:00
commit 68574bd130

View File

@ -96,8 +96,13 @@ read_all (int fd,
static void
shutdown_source (gpointer data)
{
if (g_source_remove (*(guint *) data))
guint *fd_ptr = data;
if (*fd_ptr != 0)
{
g_source_remove (*fd_ptr);
*fd_ptr = 0;
nrunning--;
if (nrunning == 0)
g_main_loop_quit (main_loop);