mirror of
https://github.com/brl/mutter.git
synced 2025-01-11 12:12:25 +00:00
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 */
|
||||
if (target_state)
|
||||
{
|
||||
GList *k;
|
||||
again_for_target_state:
|
||||
for (k = target_state->keys; k != NULL; k = k->next)
|
||||
GList *k = target_state->keys;
|
||||
|
||||
/* Note the safe while() loop, because we modify the list inline */
|
||||
while (k != NULL)
|
||||
{
|
||||
ClutterStateKey *key = k->data;
|
||||
|
||||
k = k->next;
|
||||
|
||||
/* Check if each key matches query */
|
||||
if ( (object == NULL || (object == key->object))
|
||||
&& (source_state == NULL || (source_state == key->source_state))
|
||||
@ -456,13 +459,12 @@ again_for_target_state:
|
||||
clutter_state_set_state (this, NULL);
|
||||
|
||||
/* 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);
|
||||
goto again_from_start; /* we have just freed State *target_state, so
|
||||
need to restart removal */
|
||||
}
|
||||
goto again_for_target_state;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user