diff options
author | davilla <davilla@4pi.com> | 2011-12-04 16:41:27 -0500 |
---|---|---|
committer | davilla <davilla@4pi.com> | 2011-12-04 16:41:42 -0500 |
commit | ecbb301a896fbb075c75efe7156935bae778f24a (patch) | |
tree | d6b058e265879df2eb1fef441f14a5ea5260135c | |
parent | 0d5e54a8370c3b814ab26d779e73fc8fe70d1b3f (diff) |
[osx] fixed double release. NSWindow default is to release on close but we check first as this can be changed
-rw-r--r-- | xbmc/windowing/osx/WinSystemOSX.mm | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/xbmc/windowing/osx/WinSystemOSX.mm b/xbmc/windowing/osx/WinSystemOSX.mm index 1eaf0a66f2..5cbacd95a4 100644 --- a/xbmc/windowing/osx/WinSystemOSX.mm +++ b/xbmc/windowing/osx/WinSystemOSX.mm @@ -182,7 +182,8 @@ void UnblankDisplays(void) { // Get rid of the blanking windows we created. [blankingWindows[i] close]; - [blankingWindows[i] release]; + if ([blankingWindows[i] isReleasedWhenClosed] == NO) + [blankingWindows[i] release]; blankingWindows[i] = 0; } } @@ -243,6 +244,7 @@ bool CWinSystemOSX::DestroyWindowSystem() delete m_osx_events; m_osx_events = NULL; + UnblankDisplays(); if (m_glContext) { NSOpenGLContext* oldContext = (NSOpenGLContext*)m_glContext; @@ -383,7 +385,8 @@ bool CWinSystemOSX::SetFullScreen(bool fullScreen, RESOLUTION_INFO& res, bool bl if(windowedFullScreenwindow != NULL) { [windowedFullScreenwindow close]; - [windowedFullScreenwindow release]; + if ([windowedFullScreenwindow isReleasedWhenClosed] == NO) + [windowedFullScreenwindow release]; windowedFullScreenwindow = NULL; } |