mirror of https://github.com/OpenTTD/OpenTTD.git
(svn r15652) -Fix [FS#2706]: new (this) is seldom a good idea as destructors of member variables aren't run causing memory leaks.
This commit is contained in:
parent
6667241814
commit
81595bf256
|
@ -608,7 +608,7 @@ Vehicle::~Vehicle()
|
|||
|
||||
DeleteVehicleNews(this->index, INVALID_STRING_ID);
|
||||
|
||||
new (this) InvalidVehicle();
|
||||
this->type = VEH_INVALID;
|
||||
}
|
||||
|
||||
/** Adds a vehicle to the list of vehicles, that visited a depot this tick
|
||||
|
|
Loading…
Reference in New Issue