[banshee/gapless-ng] [Banshee.NowPlaying] Add missing null check.



commit da2d78b6ee789020c12b492e81618254e9081856
Author: Christopher James Halse Rogers <chrishr src gnome org>
Date:   Sun Feb 28 11:12:15 2010 +1100

    [Banshee.NowPlaying] Add missing null check.
    
    The missing null check is obviously incorrect.  This should fix the FileSystemQueue
    crash reported against the gapless-ng branch.

 .../Banshee.NowPlaying/NowPlayingSource.cs         |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/Extensions/Banshee.NowPlaying/Banshee.NowPlaying/NowPlayingSource.cs b/src/Extensions/Banshee.NowPlaying/Banshee.NowPlaying/NowPlayingSource.cs
index 5f68029..04ee475 100644
--- a/src/Extensions/Banshee.NowPlaying/Banshee.NowPlaying/NowPlayingSource.cs
+++ b/src/Extensions/Banshee.NowPlaying/Banshee.NowPlaying/NowPlayingSource.cs
@@ -96,7 +96,8 @@ namespace Banshee.NowPlaying
                 ServiceManager.SourceManager.SetActiveSource (this);
             }
 
-            if ((current_track.MediaAttributes & TrackMediaAttributes.VideoStream) != 0) {
+            if (current_track != null &&
+                (current_track.MediaAttributes & TrackMediaAttributes.VideoStream) != 0) {
                 OnUserNotifyUpdated ();
             }
         }



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