[gnome-shell] dash: Make sure item labels are only destroyed once



commit 6c655a6c717fb47ea3e97a411ba35d402b3b0025
Author: Marco Trevisan (TreviƱo) <mail 3v1n0 net>
Date:   Mon Dec 4 20:45:35 2017 -0500

    dash: Make sure item labels are only destroyed once
    
    Labels are currently destroyed from both animateOutAndDestroy()
    and destroy(), which now (rightfully) triggers a gjs warning. As
    the label is created unconditionally since commit 36e5ae4a250,
    mirror that and always release it in destroy() and hide it
    elsewhere.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=791233

 js/ui/dash.js |    7 ++-----
 1 files changed, 2 insertions(+), 5 deletions(-)
---
diff --git a/js/ui/dash.js b/js/ui/dash.js
index 0c89545..b89040b 100644
--- a/js/ui/dash.js
+++ b/js/ui/dash.js
@@ -178,15 +178,12 @@ var DashItemContainer = new Lang.Class({
     },
 
     destroy: function() {
-        if (this.label)
-            this.label.destroy();
-
+        this.label.destroy();
         this.parent();
     },
 
     animateOutAndDestroy: function() {
-        if (this.label)
-            this.label.destroy();
+        this.label.hide();
 
         if (this.child == null) {
             this.destroy();


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