mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2025-12-22 15:23:01 +01:00
* Check if el is nullptr Check if el is nullptr Format * Add changelog
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
------------------------------------------------------------------------
|
||||
- Improved: [#21424] Extra viewports can now rotate independently from the main viewport.
|
||||
- Fix: [#910] Extra viewport does not preserve the location when rotating.
|
||||
- Fix: [#21543] Crash with creating a TrackIterator with invalid arguments.
|
||||
|
||||
0.4.9 (2024-03-02)
|
||||
------------------------------------------------------------------------
|
||||
|
||||
@@ -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