banshee r3443 - in trunk/banshee: . src/Core/Banshee.ThickClient/Banshee.Sources.Gui



Author: gburt
Date: Thu Mar 13 16:28:45 2008
New Revision: 3443
URL: http://svn.gnome.org/viewvc/banshee?rev=3443&view=rev

Log:
2008-03-13  Gabriel Burt  <gabriel burt gmail com>

	* src/Core/Banshee.ThickClient/Banshee.Sources.Gui/SourceView.cs: Avoid
	GtkCritical warning by checking that the TreeIter is not Zero before
	setting a value on it.  Fixes bug with closing the Error Source.


Modified:
   trunk/banshee/ChangeLog
   trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Sources.Gui/SourceView.cs

Modified: trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Sources.Gui/SourceView.cs
==============================================================================
--- trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Sources.Gui/SourceView.cs	(original)
+++ trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Sources.Gui/SourceView.cs	Thu Mar 13 16:28:45 2008
@@ -113,9 +113,13 @@
             
             ServiceManager.SourceManager.SourceUpdated += delegate (SourceEventArgs args) {
                 Banshee.Base.ThreadAssist.ProxyToMain (delegate {
-                    TreeIter iter = FindSource (args.Source);
-                    store.SetValue (iter, 1, args.Source.Order);
-                    QueueDraw ();
+                    lock (args.Source) {
+                        TreeIter iter = FindSource (args.Source);
+                        if (!TreeIter.Zero.Equals (iter)) {
+                            store.SetValue (iter, 1, args.Source.Order);
+                            QueueDraw ();
+                        }
+                    }
                 });
             };
             



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