[banshee] StatisticsPage: Fix crash when no tracks are selected (bgo#679769)



commit 24beb450607a88d7ce5ce27cc2664702588f8d91
Author: Bertrand Lorentz <bertrand lorentz gmail com>
Date:   Sun Apr 14 22:47:48 2013 +0200

    StatisticsPage: Fix crash when no tracks are selected (bgo#679769)

 src/Core/Banshee.ThickClient/Banshee.Gui.TrackEditor/StatisticsPage.cs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/Core/Banshee.ThickClient/Banshee.Gui.TrackEditor/StatisticsPage.cs 
b/src/Core/Banshee.ThickClient/Banshee.Gui.TrackEditor/StatisticsPage.cs
index 3ac3fef..6285e48 100644
--- a/src/Core/Banshee.ThickClient/Banshee.Gui.TrackEditor/StatisticsPage.cs
+++ b/src/Core/Banshee.ThickClient/Banshee.Gui.TrackEditor/StatisticsPage.cs
@@ -101,7 +101,7 @@ namespace Banshee.Gui.TrackEditor
 
         public void UpdateWrapWidth ()
         {
-            if (view.IsRealized) {
+            if (view.IsRealized && model != null) {
                 var width = GetValueWidth ();
 
                 model.Foreach ((TreeModel m, TreePath path, TreeIter iter) => {


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