mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-25 05:31:00 +00:00
- reset framebuffer pointer on destruction in Cocoa backend
Added debug validation of framebuffer pointer as well
This commit is contained in:
parent
651e735246
commit
a1d5833c8a
1 changed files with 4 additions and 0 deletions
|
@ -386,6 +386,7 @@ SystemGLFrameBuffer::SystemGLFrameBuffer(void*, const bool fullscreen)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
assert(frameBuffer == nullptr);
|
||||||
frameBuffer = this;
|
frameBuffer = this;
|
||||||
|
|
||||||
FConsoleWindow::GetInstance().Show(false);
|
FConsoleWindow::GetInstance().Show(false);
|
||||||
|
@ -393,6 +394,9 @@ SystemGLFrameBuffer::SystemGLFrameBuffer(void*, const bool fullscreen)
|
||||||
|
|
||||||
SystemGLFrameBuffer::~SystemGLFrameBuffer()
|
SystemGLFrameBuffer::~SystemGLFrameBuffer()
|
||||||
{
|
{
|
||||||
|
assert(frameBuffer == this);
|
||||||
|
frameBuffer = nullptr;
|
||||||
|
|
||||||
NSNotificationCenter* nc = [NSNotificationCenter defaultCenter];
|
NSNotificationCenter* nc = [NSNotificationCenter defaultCenter];
|
||||||
[nc removeObserver:m_window
|
[nc removeObserver:m_window
|
||||||
name:NSWindowDidMoveNotification
|
name:NSWindowDidMoveNotification
|
||||||
|
|
Loading…
Reference in a new issue