environment: Don't use actor if an ease callback destroys it

An actor ease callback could destroy the actor, in such case we should do not
touch the actor anymore.

So, before calling the callback, reset restore the easing state and don't
perform any further action with it.

Fixes https://gitlab.gnome.org/GNOME/gnome-shell/issues/1507
This commit is contained in:
Marco Trevisan (Treviño) 2019-08-09 02:58:28 +02:00 committed by Florian Müllner
parent 9b7f228f8e
commit 826ac95726

View File

@ -117,6 +117,7 @@ function _easeActor(actor, params) {
animatedProps.forEach(p => actor.remove_transition(p));
actor.set(params);
actor.restore_easing_state();
if (callback) {
let transition = actor.get_transition(animatedProps[0]);
@ -126,8 +127,6 @@ function _easeActor(actor, params) {
else
callback(true);
}
actor.restore_easing_state();
}
function _easeActorProperty(actor, propName, target, params) {