Fix crash after frame is freed on macOS (bug#30800)

* src/nsterm.m (x_free_frame_resources): Clear represented_frame.
(bug#30800)
This commit is contained in:
Aaron Jensen 2018-03-21 22:30:08 -07:00 committed by Alan Third
parent 45d04754e7
commit 95ccf50e37

View file

@ -1692,6 +1692,10 @@ -(void)remove
dpyinfo->x_highlight_frame = 0;
if (f == hlinfo->mouse_face_mouse_frame)
reset_mouse_highlight (hlinfo);
/* Ensure that sendEvent does not attempt to dereference a freed
frame. (bug#30800) */
if (represented_frame == f)
represented_frame = NULL;
if (f->output_data.ns->miniimage != nil)
[f->output_data.ns->miniimage release];