From 9116d624bef746117d43f48fc312104bb992d3e0 Mon Sep 17 00:00:00 2001 From: UshakovVasilii Date: Wed, 22 Nov 2017 16:42:19 +0300 Subject: [PATCH] destroy label after link cleanup for prevert set_label on not exist actor fix #71 --- freon@UshakovVasilii_Github.yahoo.com/extension.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/freon@UshakovVasilii_Github.yahoo.com/extension.js b/freon@UshakovVasilii_Github.yahoo.com/extension.js index d0725f8..5559607 100644 --- a/freon@UshakovVasilii_Github.yahoo.com/extension.js +++ b/freon@UshakovVasilii_Github.yahoo.com/extension.js @@ -436,8 +436,8 @@ const FreonMenuButton = new Lang.Class({ let hotSensors = this._settings.get_strv('hot-sensors'); if(l){ hotSensors.splice(hotSensors.indexOf(self.label), 1); - l.destroy(); delete this._hotLabels[self.label]; + l.destroy(); // destroy is called after dict cleanup to prevert set_label on not exist actor let i = this._hotIcons[self.label]; if(i){ i.destroy(); @@ -459,8 +459,9 @@ const FreonMenuButton = new Lang.Class({ let k = hotSensors[i]; if(!this._sensorMenuItems[k]){ hotSensors.splice(i, 1); - this._hotLabels[k].destroy(); + let ll = this._hotLabels[k] delete this._hotLabels[k]; + ll.destroy(); // destroy is called after dict cleanup to prevert set_label on not exist actor if(this._hotIcons[k]){ this._hotIcons[k].destroy(); delete this._hotIcons[k];