[banshee] SmartPlaylistSource: Fix NRE with "selected by random" (bgo#637366)



commit f9145fe98d9565954343fb08f6526847ee608ba5
Author: Bertrand Lorentz <bertrand lorentz gmail com>
Date:   Sat Dec 18 15:10:30 2010 +0100

    SmartPlaylistSource: Fix NRE with "selected by random" (bgo#637366)

 .../Banshee.SmartPlaylist/SmartPlaylistSource.cs   |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/Core/Banshee.Services/Banshee.SmartPlaylist/SmartPlaylistSource.cs b/src/Core/Banshee.Services/Banshee.SmartPlaylist/SmartPlaylistSource.cs
index c1058a8..2a7bf20 100644
--- a/src/Core/Banshee.Services/Banshee.SmartPlaylist/SmartPlaylistSource.cs
+++ b/src/Core/Banshee.Services/Banshee.SmartPlaylist/SmartPlaylistSource.cs
@@ -151,7 +151,7 @@ namespace Banshee.SmartPlaylist
             get { return query_order; }
             set {
                 query_order = value;
-                if (value != null) {
+                if (value != null && value.Field != null) {
                     Properties.Set<string> ("TrackListSortField", value.Field.Name);
                     Properties.Set<bool> ("TrackListSortAscending", value.Ascending);
                 } else {



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