mirror of https://github.com/OpenRCT2/OpenRCT2.git
* Check if el is nullptr Check if el is nullptr Format * Add changelog
This commit is contained in:
parent
048276b67a
commit
0c1fb5fec0
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue