1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-02-02 19:56:13 +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

@@ -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;
}