[banshee/stable-2.6] ThickClient: add null check in SourceView (bgo#732373)



commit 0a30b7ba94767413f5d48ade30a18990874736e4
Author: Andrés G. Aragoneses <knocte gmail com>
Date:   Sat Jun 28 02:44:30 2014 +0200

    ThickClient: add null check in SourceView (bgo#732373)
    
    This at least avoids Banshee crashing in the stable branch,
    although doesn't seem to fix the root of the problem.

 .../Banshee.Sources.Gui/SourceView.cs              |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/src/Core/Banshee.ThickClient/Banshee.Sources.Gui/SourceView.cs 
b/src/Core/Banshee.ThickClient/Banshee.Sources.Gui/SourceView.cs
index 88e5a42..e42e295 100644
--- a/src/Core/Banshee.ThickClient/Banshee.Sources.Gui/SourceView.cs
+++ b/src/Core/Banshee.ThickClient/Banshee.Sources.Gui/SourceView.cs
@@ -396,13 +396,19 @@ namespace Banshee.Sources.Gui
         protected override void OnRowExpanded (TreeIter iter, TreePath path)
         {
             base.OnRowExpanded (iter, path);
-            store.GetSource (iter).Expanded = true;
+            var source = store.GetSource (iter);
+            if (source != null) {
+                source.Expanded = true;
+            }
         }
 
         protected override void OnRowCollapsed (TreeIter iter, TreePath path)
         {
             base.OnRowCollapsed (iter, path);
-            store.GetSource (iter).Expanded = false;
+            var source = store.GetSource (iter);
+            if (source != null) {
+                source.Expanded = false;
+            }
         }
 
         protected override void OnCursorChanged ()


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