mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-20 13:33:02 +01:00
* Check if el is nullptr Check if el is nullptr Format * Add changelog
This commit is contained in:
@@ -23,6 +23,8 @@ using namespace OpenRCT2::TrackMetaData;
|
||||
std::shared_ptr<ScTrackIterator> ScTrackIterator::FromElement(const CoordsXY& position, int32_t elementIndex)
|
||||
{
|
||||
auto el = MapGetNthElementAt(position, elementIndex);
|
||||
if (el == nullptr)
|
||||
return nullptr;
|
||||
auto origin = GetTrackSegmentOrigin(CoordsXYE(position, el));
|
||||
if (!origin)
|
||||
return nullptr;
|
||||
|
||||
Reference in New Issue
Block a user