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

This commit is contained in:
Adam authored and GitHub committed 2021-10-10 22:01:18 +01:00
1 parent 961d51eae4
commit c812b696bd
3 files changed
+11

No files matched your search

+1
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.
+9
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();
}
+1
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);