From 3fc478a14bed00ab746c55e3c98382957e105616 Mon Sep 17 00:00:00 2001 From: Giovanni Campagna Date: Mon, 3 Feb 2014 11:26:19 +0100 Subject: [PATCH] overview: don't add a null desktop clone If there is no desktop window, getDesktopClone() returns null. In that case, we know that no animation is needed. Fixes a regression from b97f3a9ecf52183e86506af622a08eaa7e3846bb https://bugzilla.gnome.org/show_bug.cgi?id=723523 --- js/ui/overview.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/js/ui/overview.js b/js/ui/overview.js index 061175dd3..db52c5450 100644 --- a/js/ui/overview.js +++ b/js/ui/overview.js @@ -493,8 +493,13 @@ const Overview = new Lang.Class({ }, fadeOutDesktop: function() { - if (!this._desktopFade.get_n_children()) - this._desktopFade.add_child(this._getDesktopClone()); + if (!this._desktopFade.get_n_children()) { + let clone = this._getDesktopClone(); + if (!clone) + return; + + this._desktopFade.add_child(clone); + } this._desktopFade.opacity = 255; this._desktopFade.show();