mirror of https://github.com/OpenTTD/OpenTTD.git
(svn r23312) -Fix [FS#4849]: assertion could be triggered in case a station was removed just after a vehicle delivered cargo to it
This commit is contained in:
parent
ecbe29ecb7
commit
560bae8c91
|
@ -3027,8 +3027,8 @@ void TriggerWatchedCargoCallbacks(Station *st)
|
||||||
*/
|
*/
|
||||||
static bool StationHandleBigTick(BaseStation *st)
|
static bool StationHandleBigTick(BaseStation *st)
|
||||||
{
|
{
|
||||||
if (!st->IsInUse() && ++st->delete_ctr >= 8) {
|
if (!st->IsInUse()) {
|
||||||
delete st;
|
if (++st->delete_ctr >= 8) delete st;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue