gmain: fix adding a child source to an already-attached source
authorDan Winship <danw@gnome.org>
Sun, 15 Jan 2012 14:35:11 +0000 (09:35 -0500)
committerDan Winship <danw@gnome.org>
Sun, 15 Jan 2012 14:39:14 +0000 (09:39 -0500)
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.

glib/gmain.c

index 40bd829..4a79cb9 100644 (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)
     {