Skip to content

Commit

Permalink
#16. Show stopper fix to prevent a lock up.
Browse files Browse the repository at this point in the history
  • Loading branch information
zionyx committed Sep 10, 2015
1 parent 437b3fb commit af27892
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion HudsonTrayTracker/BusinessComponents/ConfigurationService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit af27892

Please sign in to comment.