gmain: handle blocked source in g_source_add_child_source()
authorWim Taymans <wim.taymans@collabora.co.uk>
Thu, 30 May 2013 14:46:02 +0000 (16:46 +0200)
committerDan Winship <danw@gnome.org>
Tue, 25 Jun 2013 13:25:57 +0000 (09:25 -0400)
commit1d5c815ecd3a5ac6032e7931491296e693b51ccd
tree35955977af96139c6d1d8120d5160beb95e11c24
parent5841267a6c046744979fc11ec856265c18c6338c
gmain: handle blocked source in g_source_add_child_source()

When a child_source is added to a blocked source it has no context, yet we
call block_source on it that segfaults when it dereferences the NULL context
when it attempts to remove the file descriptors. To fix this we:

- Ensure that when we block a source, we don't attempt to remove its file
  descriptors from a NULL context.

- Also ensure that when we attach a blocked source to a context, we don't add the
  file descriptors to the context.

https://bugzilla.gnome.org/show_bug.cgi?id=701283
glib/gmain.c