Skip to content
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

don't assign nullptr to std::string #1880

Merged
merged 1 commit into from Sep 1, 2021
Merged

don't assign nullptr to std::string #1880

merged 1 commit into from Sep 1, 2021

Conversation

neheb
Copy link
Contributor

@neheb neheb commented Sep 1, 2021

Basic godbolt test shows that assigning to nullptr calls
std::__throw_logic_error

Signed-off-by: Rosen Penev rosenp@gmail.com

@whyman
Copy link
Member

whyman commented Sep 1, 2021

Why not do the nullptr check and return?

Basic godbolt test shows that assigning to nullptr calls
std::__throw_logic_error

Signed-off-by: Rosen Penev <rosenp@gmail.com>
@neheb
Copy link
Contributor Author

neheb commented Sep 1, 2021

Done.

@whyman whyman merged commit dac4b27 into gerbera:master Sep 1, 2021
@neheb neheb deleted the 1 branch September 1, 2021 09:23
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.

None yet

2 participants