Skip to content

Added a fix in create_or_get_logger function to check logger_ptr prior to use (#748) #749

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 12, 2025

Conversation

Syed-Shahrukh-OSSRevival
Copy link
Contributor

Added check to ensure logger_ptr is not null. logger_ptr is set to _find_logger and there is a possibility for this function to return nullptr.

return (search_it != std::end(_loggers) && search_it->get()->get_logger_name() == target)
      ? search_it->get()
      : nullptr;

@odygrd
Copy link
Owner

odygrd commented Apr 12, 2025

Thanks for the PR!

@odygrd odygrd merged commit 61ef2c1 into odygrd:master Apr 12, 2025
31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants