From 673396fb654036f7eb7ba152bb6966e48c1c0e5d Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Sun, 15 Jan 2012 09:35:11 -0500 Subject: [PATCH] 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. --- glib/gmain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/glib/gmain.c b/glib/gmain.c index 40bd829..4a79cb9 100644 --- a/glib/gmain.c +++ b/glib/gmain.c @@ -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) { -- 2.7.4