Cocoa Port: Fix a longstanding, yet rare, crash that may occur when quitting the app.

This commit is contained in:
rogerman 2024-07-02 00:16:46 -07:00
parent d4163a1893
commit fe0ae83c40
2 changed files with 4 additions and 2 deletions

View File

@ -193,8 +193,6 @@ GPU3DInterface *core3DList[GPU_3D_RENDERER_COUNT+1] = {
- (void)dealloc
{
DestroyOpenGLRenderer();
delete fetchObject;
delete gpuEvent;

View File

@ -226,6 +226,10 @@ volatile bool execute = true;
delete execControl;
NDS_DeInit();
// We must call DestroyOpenGLRenderer() after NDS_Init() because we need to wait for
// the OpenGL renderer to finish before we destroy its associated context.
DestroyOpenGLRenderer();
[super dealloc];
}