gmain: child sources must always have same priority as parent

A child source does not have a priority of its own; it must have the
same priority as its parent. Enforce this in
g_source_set_priority_unlocked().

https://bugzilla.gnome.org/show_bug.cgi?id=619329
This commit is contained in:
Dan Winship 2012-04-11 10:22:45 -04:00
parent d981d79a42
commit 532f463eaf

View File

@ -1367,6 +1367,9 @@ g_source_set_priority_unlocked (GSource *source,
{ {
GSList *tmp_list; GSList *tmp_list;
g_return_if_fail (source->priv->parent_source == NULL ||
source->priv->parent_source->priority == priority);
source->priority = priority; source->priority = priority;
if (context) if (context)