background: fix early destroy of SystemBackground
If the SystemBackground is destroyed before loading, we call removeImageContent() with null, which crashes.
This commit is contained in:
parent
b742b1eed2
commit
cfef107114
@ -659,7 +659,10 @@ const SystemBackground = new Lang.Class({
|
||||
},
|
||||
|
||||
_onDestroy: function() {
|
||||
this._cache.removeImageContent(this.actor.content);
|
||||
let content = this.actor.content;
|
||||
|
||||
if (content)
|
||||
this._cache.removeImageContent(content);
|
||||
},
|
||||
});
|
||||
Signals.addSignalMethods(SystemBackground.prototype);
|
||||
|
Loading…
Reference in New Issue
Block a user