From cfef1071145629603fec7e124909e77545579e62 Mon Sep 17 00:00:00 2001 From: Giovanni Campagna Date: Thu, 26 Jun 2014 18:45:06 +0200 Subject: [PATCH] background: fix early destroy of SystemBackground If the SystemBackground is destroyed before loading, we call removeImageContent() with null, which crashes. --- js/ui/background.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/js/ui/background.js b/js/ui/background.js index 3730beb3a..021269989 100644 --- a/js/ui/background.js +++ b/js/ui/background.js @@ -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);