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:
Dan Winship 2012-01-15 09:35:11 -05:00
parent 87dc862408
commit 673396fb65

View File

@ -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)
{