[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master d94890404e: Fix crashes displaying menu help text on NS
From: |
Po Lu |
Subject: |
master d94890404e: Fix crashes displaying menu help text on NS |
Date: |
Tue, 31 May 2022 04:25:31 -0400 (EDT) |
branch: master
commit d94890404e91d5ba50afaa4bc27b9c655dbed5f1
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>
Fix crashes displaying menu help text on NS
* src/nsterm.m (ns_flush_display): Run event loop manually,
avoiding a double free of an autorelease pool.
---
src/nsterm.m | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/src/nsterm.m b/src/nsterm.m
index 3d2b4116ca..0c83656125 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -5185,14 +5185,19 @@ ns_update_window_end (struct window *w, bool
cursor_on_p,
static void
ns_flush_display (struct frame *f)
{
- struct input_event ie;
+ NSAutoreleasePool *ap;
+
+ ap = [[NSAutoreleasePool alloc] init];
/* Called from some of the minibuffer code. Run the event loop once
to make the toolkit make changes that were made to the back
- buffer visible again. TODO: what should happen to ie? */
+ buffer visible again. */
- EVENT_INIT (ie);
- ns_read_socket (FRAME_TERMINAL (f), &ie);
+ send_appdefined = YES;
+ ns_send_appdefined (-1);
+
+ [NSApp run];
+ [ap release];
}
/* This and next define (many of the) public functions in this
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master d94890404e: Fix crashes displaying menu help text on NS,
Po Lu <=