Prevent a segfault when deleting a fullscreen frame on NextStep.
* nsterm.m ([EmacsView resetCursorRects:]): Be defensive when accessing FRAME_OUTPUT_DATA. [resetCursorRects:] can be called from the event loop after the frame is deleted. When this happens, emacsframe is NULL. This means there is an underlying leak of the EmacsView object! (Bug#59794) Do not merge to master. Copyright-paperwork-exempt: yes
This commit is contained in:
parent
3768b10077
commit
029988d4a5
1 changed files with 10 additions and 2 deletions
12
src/nsterm.m
12
src/nsterm.m
|
@ -6703,8 +6703,16 @@ - (BOOL)acceptsFirstResponder
|
|||
|
||||
- (void)resetCursorRects
|
||||
{
|
||||
NSRect visible = [self visibleRect];
|
||||
NSCursor *currentCursor = FRAME_POINTER_TYPE (emacsframe);
|
||||
NSRect visible;
|
||||
NSCursor *currentCursor;
|
||||
|
||||
/* On macOS 13, [resetCursorRects:] could be called even after the
|
||||
window is closed. */
|
||||
if (! emacsframe || ! FRAME_OUTPUT_DATA (emacsframe))
|
||||
return;
|
||||
|
||||
visible = [self visibleRect];
|
||||
currentCursor = FRAME_POINTER_TYPE (emacsframe);
|
||||
NSTRACE ("[EmacsView resetCursorRects]");
|
||||
|
||||
if (currentCursor == nil)
|
||||
|
|
Loading…
Add table
Reference in a new issue