banshee r3584 - in trunk/banshee: . src/Core/Banshee.Services/Banshee.Collection



Author: gburt
Date: Sat Mar 29 08:11:04 2008
New Revision: 3584
URL: http://svn.gnome.org/viewvc/banshee?rev=3584&view=rev

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

	* src/Core/Banshee.Services/Banshee.Collection/MemoryTrackListModel.cs:
	Fully bounds check the index before accessing it.  Fixes BGO #524805.


Modified:
   trunk/banshee/ChangeLog
   trunk/banshee/src/Core/Banshee.Services/Banshee.Collection/MemoryTrackListModel.cs

Modified: trunk/banshee/src/Core/Banshee.Services/Banshee.Collection/MemoryTrackListModel.cs
==============================================================================
--- trunk/banshee/src/Core/Banshee.Services/Banshee.Collection/MemoryTrackListModel.cs	(original)
+++ trunk/banshee/src/Core/Banshee.Services/Banshee.Collection/MemoryTrackListModel.cs	Sat Mar 29 08:11:04 2008
@@ -77,7 +77,7 @@
         }
     
         public override TrackInfo this[int index] {
-            get { lock (this) { return (index < tracks.Count) ? tracks[index] : null; } }
+            get { lock (this) { return (index >= 0 && index < tracks.Count) ? tracks[index] : null; } }
         }
 
         public override int Count { 



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