1
0
Fork 0

(svn r10813) -Fix (r10799): some destructors were performing too much during the pool cleanups, which could cause crashes as already removed pool items could then be dereferenced by other destructors.

release/0.6
rubidium 2007-08-06 14:08:25 +00:00
parent e0e361c890
commit ab7e36dda7
2 changed files with 4 additions and 0 deletions

View File

@ -130,6 +130,8 @@ const IndustryTileSpec *GetIndustryTileSpec(IndustryGfx gfx, bool full_check)
Industry::~Industry()
{
if (CleaningPool()) return;
/* Industry can also be destroyed when not fully initialized.
* This means that we do not have to clear tiles either. */
if (this->width == 0) {

View File

@ -391,6 +391,8 @@ RoadStop::RoadStop(TileIndex tile) :
*/
RoadStop::~RoadStop()
{
if (CleaningPool()) return;
/* Clear the slot assignment of all vehicles heading for this road stop */
if (num_vehicles != 0) {
Vehicle *v;