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 b97f3a9ecf

https://bugzilla.gnome.org/show_bug.cgi?id=723523
This commit is contained in:
Giovanni Campagna 2014-02-03 11:26:19 +01:00
parent 203bc674fe
commit 3fc478a14b

View File

@ -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();