[gnome-shell] background: fix early destroy of SystemBackground
- From: Giovanni Campagna <gcampagna src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] background: fix early destroy of SystemBackground
- Date: Thu, 26 Jun 2014 17:20:04 +0000 (UTC)
commit cfef1071145629603fec7e124909e77545579e62
Author: Giovanni Campagna <gcampagna src gnome org>
Date: Thu Jun 26 18:45:06 2014 +0200
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 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/js/ui/background.js b/js/ui/background.js
index 3730beb..0212699 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]