mirror of
https://github.com/OpenRCT2/OpenRCT2.git
synced 2025-01-24 11:22:02 -05:00
Prevent a dereference of nullptr
This commit is contained in:
parent
d3c0a76259
commit
584c4d5134
1 changed files with 2 additions and 2 deletions
|
@ -2433,8 +2433,8 @@ void footpath_update_path_wide_flags(int32_t x, int32_t y)
|
|||
|
||||
bool footpath_is_blocked_by_vehicle(const TileCoordsXYZ& position)
|
||||
{
|
||||
auto pathElement = map_get_path_element_at(position.x, position.y, position.z)->AsPath();
|
||||
return pathElement != nullptr && pathElement->IsBlockedByVehicle();
|
||||
auto pathElement = map_get_path_element_at(position.x, position.y, position.z);
|
||||
return pathElement != nullptr && pathElement->AsPath()->IsBlockedByVehicle();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Reference in a new issue