[banshee] [LibraryWatcher] Clear the queue when disposing



commit 033fcc406046ee2c32567503464762ae6d1a5157
Author: Alexander Kojevnikov <alexander kojevnikov com>
Date:   Wed Mar 10 11:54:25 2010 +1100

    [LibraryWatcher] Clear the queue when disposing

 .../Banshee.LibraryWatcher/SourceWatcher.cs        |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/src/Extensions/Banshee.LibraryWatcher/Banshee.LibraryWatcher/SourceWatcher.cs b/src/Extensions/Banshee.LibraryWatcher/Banshee.LibraryWatcher/SourceWatcher.cs
index d53f15d..dedf14f 100644
--- a/src/Extensions/Banshee.LibraryWatcher/Banshee.LibraryWatcher/SourceWatcher.cs
+++ b/src/Extensions/Banshee.LibraryWatcher/Banshee.LibraryWatcher/SourceWatcher.cs
@@ -108,6 +108,10 @@ namespace Banshee.LibraryWatcher
                 watcher.Deleted -= OnChanged;
                 watcher.Renamed -= OnChanged;
 
+                lock (queue) {
+                    queue.Clear ();
+                }
+
                 watcher.Dispose ();
                 disposed = true;
             }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]