[banshee] Avoid NRE in media profiles combo box



commit 0e6e0f24b8926c2045e401a2dd7cec950e6fc062
Author: Gabriel Burt <gabriel burt gmail com>
Date:   Mon Feb 1 19:58:32 2010 -0800

    Avoid NRE in media profiles combo box

 .../ProfileComboBoxConfigurable.cs                 |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/src/Core/Banshee.ThickClient/Banshee.MediaProfiles.Gui/ProfileComboBoxConfigurable.cs b/src/Core/Banshee.ThickClient/Banshee.MediaProfiles.Gui/ProfileComboBoxConfigurable.cs
index bb61ea3..2d0e6e5 100644
--- a/src/Core/Banshee.ThickClient/Banshee.MediaProfiles.Gui/ProfileComboBoxConfigurable.cs
+++ b/src/Core/Banshee.ThickClient/Banshee.MediaProfiles.Gui/ProfileComboBoxConfigurable.cs
@@ -69,7 +69,10 @@ namespace Banshee.MediaProfiles.Gui
                 Combo.SetActiveProfile(config.Profile);
             }
 
-            description = new DescriptionLabel (delegate { return Combo.ActiveProfile.Description; });
+            description = new DescriptionLabel (delegate {
+                var profile = Combo.ActiveProfile;
+                return profile != null ? profile.Description : "";
+            });
 
             Combo.Changed += delegate {
                 if(Combo.ActiveProfile != null) {



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