1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-22 14:24:33 +01:00

Fix #15476: Crash in map_place_clear_func()

This commit is contained in:
Michael Steenbeek
2021-10-01 18:10:25 +02:00
committed by GitHub
parent d320a5cfe7
commit 06dc75845a
2 changed files with 3 additions and 2 deletions

View File

@@ -27,6 +27,7 @@
- Fix: [#15255] Tile Inspector shows banner information on walls that do not contain one.
- Fix: [#15257] Chat icon shows in scenario/track editor. Other icons don't disable when deactivated in options menu.
- Fix: [#15289] Unexpected behavior with duplicated banners which also caused desyncs in multiplayer.
- Fix: [#15476] Crash when placing/clearing small scenery.
- Fix: [#15487] Map animations do not work correctly when loading an exported SV6 file in vanilla RCT2.
- Fix: [#15496] Crash in paint_swinging_inverter_ship_structure().
- Improved: [#3417] Crash dumps are now placed in their own folder.

View File

@@ -37,11 +37,11 @@ static int32_t map_place_clear_func(
if (gParkFlags & PARK_FLAGS_FORBID_TREE_REMOVAL)
{
if (scenery_small_entry_has_flag(scenery, SMALL_SCENERY_FLAG_IS_TREE))
if (scenery != nullptr && scenery_small_entry_has_flag(scenery, SMALL_SCENERY_FLAG_IS_TREE))
return 1;
}
if (!(gParkFlags & PARK_FLAGS_NO_MONEY))
if (!(gParkFlags & PARK_FLAGS_NO_MONEY) && scenery != nullptr)
*price += scenery->removal_price * 10;
if (flags & GAME_COMMAND_FLAG_GHOST)