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 #7481: Don't modify oil rig stations during removal #7544

Merged
merged 1 commit into from May 3, 2019

Conversation

@nielsmh
Copy link
Contributor

nielsmh commented Apr 26, 2019

I'm not sure if this approach is entirely safe. The DeleteOilRig function is called from two places, the Industry destructor, and in afterload. The afterload call is for cleaning up orphan oil rig stations without oil rig, sometimes left over in old saves. I don't have a save of that kind on hand to test, so I don't know if it's safe.

I'm also not completely sure that the new assert can't trigger under certain (broken) situations, if a player has somehow managed to join their station with an oil rig station.

@Gymnasiast

This comment has been minimized.

Copy link

Gymnasiast commented Apr 30, 2019

I can't say anything about the overall safety or the import code, but I picked this fix and played the save in #7530 the whole evening yesterday, without any problems, as far as I noticed (though I admittedly did not focus on oil rigs).

@LordAro
LordAro approved these changes May 2, 2019
Copy link
Member

LordAro left a comment

¯\_(ツ)_/¯

@nielsmh nielsmh merged commit d1ef13f into OpenTTD:master May 3, 2019
8 checks passed
8 checks passed
OpenTTD CI Build #20190426.3 succeeded
Details
OpenTTD CI (Linux commit-checker) Linux commit-checker succeeded
Details
OpenTTD CI (Linux linux-amd64-clang-3.8) Linux linux-amd64-clang-3.8 succeeded
Details
OpenTTD CI (Linux linux-amd64-gcc-6) Linux linux-amd64-gcc-6 succeeded
Details
OpenTTD CI (Linux linux-i386-gcc-6) Linux linux-i386-gcc-6 succeeded
Details
OpenTTD CI (MacOS) MacOS succeeded
Details
OpenTTD CI (Windows Win32) Windows Win32 succeeded
Details
OpenTTD CI (Windows Win64) Windows Win64 succeeded
Details
@nielsmh nielsmh deleted the nielsmh:fix-7481 branch May 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.