aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Server.Implementations/IO
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2013-06-11 08:18:59 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2013-06-11 08:18:59 -0400
commitc16fac0500cbf01d190ec3973aaabf7c007c757c (patch)
tree5891b27df8c3ebc2a0df4cc97fb2a4299a883a41 /MediaBrowser.Server.Implementations/IO
parentc5dc02ec4334458063f55d4ce0195dfb53f7d6c2 (diff)
check timer for null before attempting to dispose
Diffstat (limited to 'MediaBrowser.Server.Implementations/IO')
-rw-r--r--MediaBrowser.Server.Implementations/IO/DirectoryWatchers.cs7
1 files changed, 5 insertions, 2 deletions
diff --git a/MediaBrowser.Server.Implementations/IO/DirectoryWatchers.cs b/MediaBrowser.Server.Implementations/IO/DirectoryWatchers.cs
index a45d5fed0..3568e446f 100644
--- a/MediaBrowser.Server.Implementations/IO/DirectoryWatchers.cs
+++ b/MediaBrowser.Server.Implementations/IO/DirectoryWatchers.cs
@@ -391,8 +391,11 @@ namespace MediaBrowser.Server.Implementations.IO
Logger.Info("Timer stopped.");
- _updateTimer.Dispose();
- _updateTimer = null;
+ if (_updateTimer != null)
+ {
+ _updateTimer.Dispose();
+ _updateTimer = null;
+ }
}
var paths = _affectedPaths.Keys.ToList();