mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-27 07:56:14 +01:00
gmain: fix adding a child source to an already-attached source
Adding a child source to an already-attached parent source would crash, because we were passing the parent's context when setting the child's priority.
This commit is contained in:
parent
87dc862408
commit
673396fb65
@ -1174,7 +1174,7 @@ g_source_add_child_source (GSource *source,
|
||||
source->priv->child_sources = g_slist_prepend (source->priv->child_sources,
|
||||
g_source_ref (child_source));
|
||||
child_source->priv->parent_source = source;
|
||||
g_source_set_priority_unlocked (child_source, context, source->priority);
|
||||
g_source_set_priority_unlocked (child_source, NULL, source->priority);
|
||||
|
||||
if (context)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user