Cocoa Port: Fix yet another crash-on-exit bug that could happen when running on an older system.
This commit is contained in:
parent
dd88556d53
commit
d480f95d79
|
@ -4763,6 +4763,13 @@ void GPUSubsystem::_UpdateFPSRender3D()
|
|||
|
||||
void GPUSubsystem::SetEventHandler(GPUEventHandler *eventHandler)
|
||||
{
|
||||
if ( (eventHandler == NULL) && (this->_event != this->_defaultEventHandler) )
|
||||
{
|
||||
this->ForceFrameStop();
|
||||
this->_event = this->_defaultEventHandler;
|
||||
return;
|
||||
}
|
||||
|
||||
this->_event = eventHandler;
|
||||
}
|
||||
|
||||
|
|
|
@ -193,6 +193,8 @@ GPU3DInterface *core3DList[GPU_3D_RENDERER_COUNT+1] = {
|
|||
|
||||
- (void)dealloc
|
||||
{
|
||||
GPU->SetEventHandler(NULL); // Unassigned our event handler before we delete it.
|
||||
|
||||
delete fetchObject;
|
||||
delete gpuEvent;
|
||||
|
||||
|
|
Loading…
Reference in New Issue