Fixed clutter_state_remove_key_internal() to propagate the is_inert state
This was causing warnings when calling g_object_weak_unref on an already finalized object. https://bugzilla.gnome.org/show_bug.cgi?id=668951
This commit is contained in:
parent
047f60b138
commit
ad276865d2
@ -432,12 +432,15 @@ again_from_start:
|
|||||||
/* Go through each TargetState */
|
/* Go through each TargetState */
|
||||||
if (target_state)
|
if (target_state)
|
||||||
{
|
{
|
||||||
GList *k;
|
GList *k = target_state->keys;
|
||||||
again_for_target_state:
|
|
||||||
for (k = target_state->keys; k != NULL; k = k->next)
|
/* Note the safe while() loop, because we modify the list inline */
|
||||||
|
while (k != NULL)
|
||||||
{
|
{
|
||||||
ClutterStateKey *key = k->data;
|
ClutterStateKey *key = k->data;
|
||||||
|
|
||||||
|
k = k->next;
|
||||||
|
|
||||||
/* Check if each key matches query */
|
/* Check if each key matches query */
|
||||||
if ( (object == NULL || (object == key->object))
|
if ( (object == NULL || (object == key->object))
|
||||||
&& (source_state == NULL || (source_state == key->source_state))
|
&& (source_state == NULL || (source_state == key->source_state))
|
||||||
@ -456,13 +459,12 @@ again_for_target_state:
|
|||||||
clutter_state_set_state (this, NULL);
|
clutter_state_set_state (this, NULL);
|
||||||
|
|
||||||
/* remove any keys that exist that uses this state as a source */
|
/* remove any keys that exist that uses this state as a source */
|
||||||
clutter_state_remove_key (this, s->data, NULL, NULL, NULL);
|
clutter_state_remove_key_internal (this, s->data, NULL, NULL, NULL, is_inert);
|
||||||
|
|
||||||
g_hash_table_remove (this->priv->states, s->data);
|
g_hash_table_remove (this->priv->states, s->data);
|
||||||
goto again_from_start; /* we have just freed State *target_state, so
|
goto again_from_start; /* we have just freed State *target_state, so
|
||||||
need to restart removal */
|
need to restart removal */
|
||||||
}
|
}
|
||||||
goto again_for_target_state;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user