[banshee/stable-1.6] [TrackActions] Fix collection-modified crash
- From: Gabriel Burt <gburt src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [banshee/stable-1.6] [TrackActions] Fix collection-modified crash
- Date: Sun, 25 Apr 2010 23:12:49 +0000 (UTC)
commit f85326baa08b30924bc2c69446af41eb0da36593
Author: Gabriel Burt <gabriel burt gmail com>
Date: Sun Apr 25 13:41:19 2010 -0700
[TrackActions] Fix collection-modified crash
Fixes bgo#615094
.../Banshee.Gui/TrackActions.cs | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/src/Core/Banshee.ThickClient/Banshee.Gui/TrackActions.cs b/src/Core/Banshee.ThickClient/Banshee.Gui/TrackActions.cs
index 1d8ebfc..1d0d779 100644
--- a/src/Core/Banshee.ThickClient/Banshee.Gui/TrackActions.cs
+++ b/src/Core/Banshee.ThickClient/Banshee.Gui/TrackActions.cs
@@ -329,6 +329,11 @@ namespace Banshee.Gui
{
Source active_source = ServiceManager.SourceManager.ActiveSource;
+ List<Source> children;
+ lock (ActivePrimarySource.Children) {
+ children = new List<Source> (ActivePrimarySource.Children);
+ }
+
// TODO find just the menu that was activated instead of modifying all proxies
foreach (Widget proxy_widget in (o as Gtk.Action).Proxies) {
MenuItem menu = proxy_widget as MenuItem;
@@ -341,7 +346,7 @@ namespace Banshee.Gui
submenu.Append (this ["AddToNewPlaylistAction"].CreateMenuItem ());
bool separator_added = false;
- foreach (Source child in ActivePrimarySource.Children) {
+ foreach (Source child in children) {
PlaylistSource playlist = child as PlaylistSource;
if (playlist != null) {
if (!separator_added) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]