1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-20 05:23:04 +01:00

Fix #14741: crash on macOS exit (#15550)

This commit is contained in:
Adam
2021-10-10 15:01:18 -06:00
committed by GitHub
parent 961d51eae4
commit c812b696bd
3 changed files with 11 additions and 0 deletions

View File

@@ -15,6 +15,7 @@
- Fix: [#14316] Closing the Track Designs Manager window causes broken state.
- Fix: [#14649] ImageImporter incorrectly remaps colours outside the RCT2 palette.
- Fix: [#14667] “Extreme Hawaiian Island” has unpurchaseable land tiles (original bug).
- Fix: [#14741] Crash when exiting OpenRCT2 on macOS.
- Fix: [#15096] Crash when placing entrances in the scenario editor near the map corner.
- Fix: [#15136] Exported SV6 files cause vanilla RCT2 to hang.
- Fix: [#15142] ToonTowner's mine roofs were moved into the pirate theme scenery group instead of the mine theme scenery group.

View File

@@ -170,3 +170,12 @@ void Painter::ReleaseSession(paint_session* session)
session->PaintEntryChain.Clear();
_freePaintSessions.push_back(session);
}
Painter::~Painter()
{
for (auto&& session : _paintSessionPool)
{
ReleaseSession(session.get());
}
_paintSessionPool.clear();
}

View File

@@ -49,6 +49,7 @@ namespace OpenRCT2
paint_session* CreateSession(rct_drawpixelinfo* dpi, uint32_t viewFlags);
void ReleaseSession(paint_session* session);
~Painter();
private:
void PaintReplayNotice(rct_drawpixelinfo* dpi, const char* text);