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

Fix #6389. #6559

Merged
merged 1 commit into from Mar 13, 2022
Merged

Fix #6389. #6559

merged 1 commit into from Mar 13, 2022

Conversation

Pentarctagon
Copy link
Member

@Pentarctagon Pentarctagon commented Mar 12, 2022

Previously this code assumed that all add-ons would have a _server.pbl or an _info.cfg. When neither was the case, it tried to dereference the begin() of an empty set, causing the crash.

@github-actions github-actions bot added the Add-ons Issues with the add-ons client and/or server. label Mar 12, 2022
Previously this code assumed that all add-ons would have a _server.pbl or an _info.cfg. When neither was the case, it tried to dereference the begin() of an empty set, causing the crash.
@Pentarctagon
Copy link
Member Author

Tested locally and it's a pretty simple change, so I'll merge this tomorrow if there's no comments.

@Vultraz
Copy link
Member

Vultraz commented Mar 12, 2022

Suggest making remote_version an optional<remote_version>.

@CelticMinstrel
Copy link
Member

That would require checking everywhere it's accessed, though, so it would be potentially a much bigger change.

@Vultraz
Copy link
Member

Vultraz commented Mar 12, 2022

image

@Pentarctagon
Copy link
Member Author

What would that accomplish though? Making remote_version an optional would mean I'd still need to make the same check here (to avoid the bad dereference) while also adding handling anywhere it's currently used rather than setting a default value here once.

@Pentarctagon Pentarctagon merged commit 93e4dfc into wesnoth:1.16 Mar 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Add-ons Issues with the add-ons client and/or server.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants