From c16fac0500cbf01d190ec3973aaabf7c007c757c Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Tue, 11 Jun 2013 08:18:59 -0400 Subject: [PATCH] check timer for null before attempting to dispose --- .../IO/DirectoryWatchers.cs | 7 +++++-- 1 file 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();