mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-28 23:11:58 +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;
|
||||
|
||||
FConsoleWindow::GetInstance().Show(false);
|
||||
|
@ -393,6 +394,9 @@ SystemGLFrameBuffer::SystemGLFrameBuffer(void*, const bool fullscreen)
|
|||
|
||||
SystemGLFrameBuffer::~SystemGLFrameBuffer()
|
||||
{
|
||||
assert(frameBuffer == this);
|
||||
frameBuffer = nullptr;
|
||||
|
||||
NSNotificationCenter* nc = [NSNotificationCenter defaultCenter];
|
||||
[nc removeObserver:m_window
|
||||
name:NSWindowDidMoveNotification
|
||||
|
|
Loading…
Reference in a new issue