mirror of https://github.com/OpenRCT2/OpenRCT2.git
Unload objects from context destructor.
This commit is contained in:
parent
ccf12befd5
commit
1ca41da2aa
|
@ -135,6 +135,13 @@ namespace OpenRCT2
|
|||
|
||||
~Context() override
|
||||
{
|
||||
// Requires this as otherwise it will try to access Instance from other destructors.
|
||||
// after setting Instance to nullptr.
|
||||
if (_objectManager)
|
||||
{
|
||||
_objectManager->UnloadAll();
|
||||
}
|
||||
|
||||
window_close_all();
|
||||
gfx_object_check_all_images_freed();
|
||||
gfx_unload_g2();
|
||||
|
|
Loading…
Reference in New Issue