Skip to content

Commit

Permalink
destroy label after link cleanup for prevert set_label on not exist a…
Browse files Browse the repository at this point in the history
…ctor fix #71
  • Loading branch information
UshakovVasilii committed Nov 22, 2017
1 parent 79997ae commit 9116d62
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions freon@UshakovVasilii_Github.yahoo.com/extension.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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];
Expand Down

0 comments on commit 9116d62

Please sign in to comment.