mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-10 03:16:17 +01:00
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:
commit
68574bd130
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user