[banshee] DatabaseTrackListModel: Fix NRE while reloading DB models



commit a8a6f03c57a412d8d737aa57ff60fbe86d9c1ea2
Author: Chow Loong Jin <hyperair ubuntu com>
Date:   Wed Aug 10 15:28:08 2011 +0800

    DatabaseTrackListModel: Fix NRE while reloading DB models
    
    This fixes a random crasher while changing tracks (bgo#656246).
    
    Signed-off-by: Bertrand Lorentz <bertrand lorentz gmail com>

 .../DatabaseTrackListModel.cs                      |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseTrackListModel.cs b/src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseTrackListModel.cs
index a26ada3..ad9b45d 100644
--- a/src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseTrackListModel.cs
+++ b/src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseTrackListModel.cs
@@ -273,7 +273,9 @@ namespace Banshee.Collection.Database
                 bool found = (reloadTrigger == null);
                 foreach (IFilterListModel filter in source.CurrentFilters) {
                     if (found) {
-                        reload_models.Add (filter);
+                        if (filter != null) {
+                            reload_models.Add (filter);
+                        }
                     } else if (filter == reloadTrigger) {
                         found = true;
                     }



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