autorunManager: Fix another regression

We may not have a resident source to destroy if no mounts are found.
This commit is contained in:
Jasper St. Pierre 2012-09-05 13:46:55 -03:00
parent 09c81f79f6
commit 457fb604dd

View File

@ -169,6 +169,7 @@ const AutorunManager = new Lang.Class({
}, },
disable: function() { disable: function() {
if (this._residentSource)
this._residentSource.destroy(); this._residentSource.destroy();
this._volumeMonitor.disconnect(this._mountAddedId); this._volumeMonitor.disconnect(this._mountAddedId);
this._volumeMonitor.disconnect(this._mountRemovedId); this._volumeMonitor.disconnect(this._mountRemovedId);