Fix crash when removing routing restriction with reserve through from tunnel/bridge

This commit is contained in:
Jonathan G Rennison 2022-09-22 18:12:24 +01:00
parent ac1071f4fc
commit b3a8dd44e4

View File

@ -1416,7 +1416,9 @@ bool TraceRestrictRemoveProgramMapping(TraceRestrictRefId ref)
TraceRestrictRemoveProgramMapping(const_cast<const TraceRestrictProgram *>(prog)->GetRefIdsPtr()[0]); TraceRestrictRemoveProgramMapping(const_cast<const TraceRestrictProgram *>(prog)->GetRefIdsPtr()[0]);
} }
if (update_reserve_through) UpdateSignalReserveThroughBit(tile, track, true); if (update_reserve_through && IsTileType(tile, MP_RAILWAY)) {
UpdateSignalReserveThroughBit(tile, track, true);
}
return true; return true;
} else { } else {
return false; return false;