mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-16 02:50:26 -08:00
Fix crash in ns_mouse_position (bug#44313)
* src/nsterm.m (ns_destroy_window): Close the window before freeing
the frame resources so we don't end up accessing the frame struct
after it's been freed.
(cherry picked from commit 18a7267c32)
This commit is contained in:
parent
62a6934af9
commit
6aa9fe3e1b
1 changed files with 3 additions and 1 deletions
|
|
@ -1657,6 +1657,8 @@ ns_destroy_window (struct frame *f)
|
||||||
{
|
{
|
||||||
NSTRACE ("ns_destroy_window");
|
NSTRACE ("ns_destroy_window");
|
||||||
|
|
||||||
|
check_window_system (f);
|
||||||
|
|
||||||
/* If this frame has a parent window, detach it as not doing so can
|
/* If this frame has a parent window, detach it as not doing so can
|
||||||
cause a crash in GNUStep. */
|
cause a crash in GNUStep. */
|
||||||
if (FRAME_PARENT_FRAME (f) != NULL)
|
if (FRAME_PARENT_FRAME (f) != NULL)
|
||||||
|
|
@ -1667,7 +1669,7 @@ ns_destroy_window (struct frame *f)
|
||||||
[parent removeChildWindow: child];
|
[parent removeChildWindow: child];
|
||||||
}
|
}
|
||||||
|
|
||||||
check_window_system (f);
|
[[FRAME_NS_VIEW (f) window] close];
|
||||||
ns_free_frame_resources (f);
|
ns_free_frame_resources (f);
|
||||||
ns_window_num--;
|
ns_window_num--;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue