diff --git a/src/native/macosx/org_lwjgl_opengl_Display.m b/src/native/macosx/org_lwjgl_opengl_Display.m index 308571d8..76fdd237 100644 --- a/src/native/macosx/org_lwjgl_opengl_Display.m +++ b/src/native/macosx/org_lwjgl_opengl_Display.m @@ -565,10 +565,9 @@ JNIEXPORT void JNICALL Java_org_lwjgl_opengl_MacOSXDisplay_nDestroyWindow(JNIEnv if ([window_info->window contentView] == window_info->view) { [window_info->window close]; } - else { - // the nsview has a parent, remove it from there - [window_info->view removeFromSuperviewWithoutNeedingDisplay]; - } + + // release the nsview and remove it from any parent nsview + [window_info->view removeFromSuperviewWithoutNeedingDisplay]; } }