summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/nsterm.m4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/nsterm.m b/src/nsterm.m
index 3dd915e3703..4defeee7c3a 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -1657,6 +1657,8 @@ ns_destroy_window (struct frame *f)
{
NSTRACE ("ns_destroy_window");
+ check_window_system (f);
+
/* If this frame has a parent window, detach it as not doing so can
cause a crash in GNUStep. */
if (FRAME_PARENT_FRAME (f) != NULL)
@@ -1667,7 +1669,7 @@ ns_destroy_window (struct frame *f)
[parent removeChildWindow: child];
}
- check_window_system (f);
+ [[FRAME_NS_VIEW (f) window] close];
ns_free_frame_resources (f);
ns_window_num--;
}