1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-06 06:32:56 +01:00

Fix #22527: Forcing element type to wall via scripts can crash the game (#22674)

This commit is contained in:
mrmbernardi
2024-09-02 04:15:21 +10:00
committed by GitHub
parent 8380822362
commit 075ed43286
2 changed files with 2 additions and 1 deletions

View File

@@ -23,6 +23,7 @@
- Fix: [#22395, #22396] Misaligned tick marks in financial and guest count graphs (original bug).
- Fix: [#22457] Potential crash opening the scenario select window.
- Fix: [#22520] Virtual floor no longer appears when holding modifier keys during track construction.
- Fix: [#22527] Forcing an element type to “wall” via scripts can crash the game.
- Fix: [#22582] Lighting effects are not enabled/disabled correctly, making the game appear frozen.
- Fix: [#22598] Add several .parkpatch files to .sea scenarios with corresponding patches for RCT1 and RCT2 scenarios.
- Fix: [#22606] Virtual floor is sometimes drawn above the path when placing paths.

View File

@@ -2216,7 +2216,7 @@ namespace OpenRCT2::Scripting
case TileElementType::Wall:
{
auto wallEntry = _element->AsWall()->GetEntry();
if (wallEntry->scrolling_mode == SCROLLING_MODE_NONE)
if (wallEntry == nullptr || wallEntry->scrolling_mode == SCROLLING_MODE_NONE)
return;
break;
}