[banshee/stable-1.6] [Dap.Ipod] Fix a race condition
- From: Alexander Kojevnikov <alexk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [banshee/stable-1.6] [Dap.Ipod] Fix a race condition
- Date: Thu, 22 Apr 2010 00:03:06 +0000 (UTC)
commit f8f65c2973c5d22abbdc11c89c98656b306705bb
Author: Andrés G. Aragoneses <knocte gmail com>
Date: Thu Apr 22 09:58:40 2010 +1000
[Dap.Ipod] Fix a race condition
Signed-off-by: Alexander Kojevnikov <alexander kojevnikov com>
.../Banshee.Dap.Ipod/IpodSource.cs | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/src/Dap/Banshee.Dap.Ipod/Banshee.Dap.Ipod/IpodSource.cs b/src/Dap/Banshee.Dap.Ipod/Banshee.Dap.Ipod/IpodSource.cs
index 9a989c7..97b6ee5 100644
--- a/src/Dap/Banshee.Dap.Ipod/Banshee.Dap.Ipod/IpodSource.cs
+++ b/src/Dap/Banshee.Dap.Ipod/Banshee.Dap.Ipod/IpodSource.cs
@@ -602,7 +602,11 @@ namespace Banshee.Dap.Ipod
if (SupportsPlaylists) {
// Add playlists from Banshee to the device
- foreach (Source child in Children) {
+ List<Source> children = null;
+ lock (Children) {
+ children = new List<Source> (Children);
+ }
+ foreach (Source child in children) {
PlaylistSource from = child as PlaylistSource;
if (from != null && from.Count > 0) {
IPod.Playlist playlist = ipod_device.TrackDatabase.CreatePlaylist (from.Name);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]