forked from rosebudai/OpenRCT2-Web
Fix #16073: Crash in Sub6E1F34SmallScenery()
This commit is contained in:
1 parent
3faa0ebc4b
commit
65500461e1
1 file changed
+7
-1
@@ -1267,7 +1267,13 @@ static void Sub6E1F34SmallScenery(
|
||||
uint16_t maxPossibleHeight = (std::numeric_limits<decltype(TileElement::base_height)>::max() - 32) * ZoomLevel::max();
|
||||
bool can_raise_item = false;
|
||||
|
||||
auto* sceneryEntry = get_small_scenery_entry(sceneryIndex);
|
||||
const auto* sceneryEntry = get_small_scenery_entry(sceneryIndex);
|
||||
if (sceneryEntry == nullptr)
|
||||
{
|
||||
gridPos.SetNull();
|
||||
return;
|
||||
}
|
||||
|
||||
maxPossibleHeight -= sceneryEntry->height;
|
||||
if (sceneryEntry->HasFlag(SMALL_SCENERY_FLAG_STACKABLE))
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user