Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Fix #7481: Don't modify oil rig stations during removal #7544
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.