diff --git a/HudsonTrayTracker/BusinessComponents/ConfigurationService.cs b/HudsonTrayTracker/BusinessComponents/ConfigurationService.cs index 7bfa4c9..ad2cffb 100644 --- a/HudsonTrayTracker/BusinessComponents/ConfigurationService.cs +++ b/HudsonTrayTracker/BusinessComponents/ConfigurationService.cs @@ -187,7 +187,10 @@ public string GetSoundPath(string status) public void SetSoundPath(string status, string path) { PropertyInfo prop = NotificationSettings.GetType().GetProperty(status + "SoundPath"); - if( prop.GetValue(NotificationSettings, null).ToString().CompareTo(path) != 0 ) + object obj = prop.GetValue(NotificationSettings, null); + + // obj == null, is to allow NOTHING to be set to the status. + if (obj == null || obj.ToString().CompareTo(path) != 0) { prop.SetValue(NotificationSettings, path, null); SaveConfiguration();