From 457fb604ddeede1ec4d5b99e31ed280f3f2db0f5 Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Wed, 5 Sep 2012 13:46:55 -0300 Subject: [PATCH] autorunManager: Fix another regression We may not have a resident source to destroy if no mounts are found. --- js/ui/components/autorunManager.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/js/ui/components/autorunManager.js b/js/ui/components/autorunManager.js index cf75cb11c..38f93bc8c 100644 --- a/js/ui/components/autorunManager.js +++ b/js/ui/components/autorunManager.js @@ -169,7 +169,8 @@ const AutorunManager = new Lang.Class({ }, disable: function() { - this._residentSource.destroy(); + if (this._residentSource) + this._residentSource.destroy(); this._volumeMonitor.disconnect(this._mountAddedId); this._volumeMonitor.disconnect(this._mountRemovedId); },