mirror of https://github.com/OpenRCT2/OpenRCT2.git
Fix closing invention list window while holding invention
Calling `Close()` on a window deletes its object, rendering any future uses of its members invalid. This can be triggered by opening inventions list window, holding an invention, closing the inventions list window (e.g. with keyboard) and then releasing the held invention
This commit is contained in:
parent
801d760487
commit
bb6182bafb
|
@ -619,6 +619,7 @@ public:
|
|||
if (inventionListWindow == nullptr)
|
||||
{
|
||||
Close();
|
||||
return;
|
||||
}
|
||||
std::optional<InventionListItem> res;
|
||||
// Skip always researched items, so that the dragged item gets placed underneath them
|
||||
|
|
Loading…
Reference in New Issue