[gnome-shell] environment: Don't use actor if an ease callback destroys it



commit 826ac957262167d01996ea26caf77f122bff8545
Author: Marco Trevisan (Treviño) <mail 3v1n0 net>
Date:   Fri Aug 9 02:58:28 2019 +0200

    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 60d73d9ccb..0c291b0a20 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) {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]