diff options
author | Sven Gothel <[email protected]> | 2019-01-23 02:17:13 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2019-01-23 02:17:13 +0100 |
commit | 025e4548e982954528a461637a02d07dc509530e (patch) | |
tree | 0aa849831dc3345a41ea8c9e0878aa3edb699705 /src | |
parent | cc157b6a7dfbdefbbfc31085b4013e395cfecd13 (diff) |
OSX/Newt: Catch NSRangeException on closing a window
rarely occurs on terminating or killing the process
Diffstat (limited to 'src')
-rw-r--r-- | src/nativewindow/native/macosx/OSXmisc.m | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/nativewindow/native/macosx/OSXmisc.m b/src/nativewindow/native/macosx/OSXmisc.m index 80ddee415..c04ba786e 100644 --- a/src/nativewindow/native/macosx/OSXmisc.m +++ b/src/nativewindow/native/macosx/OSXmisc.m @@ -383,8 +383,13 @@ JNIEXPORT void JNICALL Java_jogamp_nativewindow_macosx_OSXUtil_DestroyNSWindow0 NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init]; [CATransaction begin]; +NS_DURING NSWindow* mWin = (NSWindow*) ((intptr_t) nsWindow); [mWin close]; // performs release! +NS_HANDLER + // On killing or terminating the process [NSWindow _close], rarely + // throws an NSRangeException while ordering out menu items +NS_ENDHANDLER [CATransaction commit]; [pool release]; |