From 8f7d5cde9067f7053db44b19740d5b62f34af61f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Thu, 10 Feb 2011 12:56:19 +0100 Subject: [PATCH] app-display: Only reset filters when they have been initialized The view might get mapped before the filters have been added, so trying to reset to the "All" filter will throw an exception. Fix by only do the reset if the filters have been initialized. --- js/ui/appDisplay.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js index ad3da75c0..a723ceaac 100644 --- a/js/ui/appDisplay.js +++ b/js/ui/appDisplay.js @@ -115,7 +115,7 @@ ViewByCategories.prototype = { // Always select the "All" filter when switching to the app view this.actor.connect('notify::mapped', Lang.bind(this, function() { - if (this.actor.mapped) + if (this.actor.mapped && this._allFilter) this._selectCategory(-1); }));