Fix #17553: Crash when moving invention list items to empty list (#17555)

* Fix content check

* Add change log entry

Co-authored-by: Duncan <duncans_pumpkin@hotmail.co.uk>
This commit is contained in:
Henry Cheng 2022-07-17 03:12:29 -04:00 committed by GitHub
parent 37a38af6a5
commit 3bad01a704
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 1 deletions

View file

@ -194,6 +194,7 @@ The following people are not part of the development team, but have been contrib
* Erik Wouters (EWouters)
* Hoby R. (hobyr)
* Huu Kim Nguyen (CoderUndefined)
* Henry Cheng (jazzysoggy)
## Toolchain
* (Balletie) - macOS

View file

@ -7,6 +7,7 @@
- Fix: [#16476] The game sometimes crashes when demolishing a maze.
- Fix: [#17444] “Manta Ray” boats slowed down too much in “Ayers Rock” scenario (original bug).
- Fix: [#17503] Parks with staff with an ID of 0 have all staff windows focus on that staff
- Fix: [#17553] Crash when moving invention list items to empty list
0.4.1 (2022-07-04)
------------------------------------------------------------------------

View file

@ -618,7 +618,7 @@ public:
{
res = inventionListWindow->GetResearchItemAt(newScreenCoords);
newScreenCoords.y += LIST_ROW_HEIGHT;
} while (res.has_value() && res->research->IsAlwaysResearched());
} while (res.has_value() && res->research != nullptr && res->research->IsAlwaysResearched());
if (res.has_value())
{