[banshee/gio-hardware] The Sources list can be modified while we're iterating over it if we're unlucky.
- From: Alan McGovern <alanmc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [banshee/gio-hardware] The Sources list can be modified while we're iterating over it if we're unlucky.
- Date: Tue, 20 Jul 2010 23:40:57 +0000 (UTC)
commit 3920a60d868867602e5641bd53f8e76e6560939c
Author: Alan McGovern <alan mcgovern gmail com>
Date: Wed Jul 21 00:04:07 2010 +0100
The Sources list can be modified while we're iterating over it if we're unlucky.
src/Dap/Banshee.Dap/Banshee.Dap/DapSync.cs | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/Dap/Banshee.Dap/Banshee.Dap/DapSync.cs b/src/Dap/Banshee.Dap/Banshee.Dap/DapSync.cs
index 6e38d30..0357e4e 100644
--- a/src/Dap/Banshee.Dap/Banshee.Dap/DapSync.cs
+++ b/src/Dap/Banshee.Dap/Banshee.Dap/DapSync.cs
@@ -159,7 +159,8 @@ namespace Banshee.Dap
src_mgr.SourceAdded += OnSourceAdded;
src_mgr.SourceRemoved += OnSourceRemoved;
- foreach (var src in src_mgr.Sources) {
+ var sources = src_mgr.Sources.ToList ();
+ foreach (var src in sources) {
AddLibrary (src, false);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]