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 1 commit into from May 3, 2019


Copy link

@nielsmh 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.

Copy link

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).

Copy link

@LordAro LordAro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


@nielsmh nielsmh merged commit d1ef13f into OpenTTD:master May 3, 2019
@nielsmh nielsmh deleted the fix-7481 branch May 3, 2019 07:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

Successfully merging this pull request may close these issues.

None yet

3 participants