[banshee] ThickClient: add null check in SourceView (bgo#732373)



commit c841c1d8239353a5b64ad3eadac59e41b9b6c968
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 425547a..cba172e 100644
--- a/src/Core/Banshee.ThickClient/Banshee.Sources.Gui/SourceView.cs
+++ b/src/Core/Banshee.ThickClient/Banshee.Sources.Gui/SourceView.cs
@@ -385,13 +385,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]