1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2025-12-10 09:32:29 +01:00

Fix #15579: Crash in track_block_get_next()

This commit is contained in:
Michael Steenbeek
2021-10-26 20:05:13 +02:00
committed by GitHub
parent 2146abb17f
commit dd007c836f
2 changed files with 2 additions and 1 deletions

View File

@@ -43,6 +43,7 @@
- Fix: [#15514] Two different “quit to menu” menu items are available in track designer and track design manager.
- Fix: [#15560] Memory leak due to OpenGL Renderer not releasing a texture.
- Fix: [#15567] Litter not being counted correctly during Park rating calculation (original bug).
- Fix: [#15579] Crash in track_block_get_next().
- Fix: [#15582] [Plugin] Litter properties return incorrect values.
- Fix: [#15584] Ride income underflows when on-ride photos are making losses.
- Fix: [#15612] Crash when placing walls beside certain scenery objects.

View File

@@ -525,7 +525,6 @@ bool track_block_get_next(CoordsXYE* input, CoordsXYE* output, int32_t* z, int32
return false;
auto inputElement = input->element->AsTrack();
const auto& ted = GetTrackElementDescriptor(inputElement->GetTrackType());
if (inputElement == nullptr)
return false;
@@ -534,6 +533,7 @@ bool track_block_get_next(CoordsXYE* input, CoordsXYE* output, int32_t* z, int32
if (ride == nullptr)
return false;
const auto& ted = GetTrackElementDescriptor(inputElement->GetTrackType());
const auto* trackBlock = ted.Block;
if (trackBlock == nullptr)
return false;