Skip to content

Commit

Permalink
Fixing potentially infinite loop with logs in Color Picker (#5558)
Browse files Browse the repository at this point in the history
  • Loading branch information
martinchrzan authored and enricogior committed Aug 4, 2020
1 parent d323611 commit 76ab389
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/modules/colorPicker/ColorPickerUI/Helpers/Logger.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ private static string GetCallerInfo()

var methodName = stackTrace.GetFrame(3)?.GetMethod();
var className = methodName?.DeclaringType.Name;
return "[Method]: " + methodName.Name + " [Class]: " + className;
return "[Method]: " + methodName?.Name + " [Class]: " + className;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,13 @@ private void LoadSettingsFromJson()
}
catch (Exception ex)
{
if (retryCount > MaxNumberOfRetry)
{
retry = false;
}

Logger.LogError("Failed to read changed settings", ex);
Thread.Sleep(500);
}
}
};
Expand Down

0 comments on commit 76ab389

Please sign in to comment.