Created
March 22, 2018 05:41
-
-
Save aaronjensen/ceb2b8be858efa956a1e691bac9b78fd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From 323740bf0d554fbfc6afc90ed81c68879cd46ece Mon Sep 17 00:00:00 2001 | |
From: Aaron Jensen <[email protected]> | |
Date: Wed, 21 Mar 2018 22:30:08 -0700 | |
Subject: [PATCH] Fix crash after frame is freed on macOS (bug#30800) | |
* src/nsterm.m (x_free_frame_resources): Clear represented_frame. | |
(bug#30800) | |
--- | |
src/nsterm.m | 4 ++++ | |
1 file changed, 4 insertions(+) | |
diff --git a/src/nsterm.m b/src/nsterm.m | |
index 3d58cd5ec6..c8ae31abc0 100644 | |
--- a/src/nsterm.m | |
+++ b/src/nsterm.m | |
@@ -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]; | |
-- | |
2.16.2 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment