]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix crash after frame is freed on macOS (bug#30800)
authorAaron Jensen <aaronjensen@gmail.com>
Thu, 22 Mar 2018 05:30:08 +0000 (22:30 -0700)
committerAlan Third <alan@idiocy.org>
Sun, 25 Mar 2018 19:13:05 +0000 (20:13 +0100)
* src/nsterm.m (x_free_frame_resources): Clear represented_frame.
(bug#30800)

src/nsterm.m

index 3d58cd5ec649dee9f0fdb2e1cef2cca08c0b466c..c8ae31abc09a0ac9473d13c84594b01194f3bc0a 100644 (file)
@@ -1692,6 +1692,10 @@ x_free_frame_resources (struct frame *f)
     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];