From 826ac957262167d01996ea26caf77f122bff8545 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Fri, 9 Aug 2019 02:58:28 +0200 Subject: [PATCH] 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 --- js/ui/environment.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/js/ui/environment.js b/js/ui/environment.js index 60d73d9cc..0c291b0a2 100644 --- a/js/ui/environment.js +++ b/js/ui/environment.js @@ -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) {