[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 6f3d8ec4f5 1/2: Fix crash destroying NS frame tool bar
From: |
Po Lu |
Subject: |
master 6f3d8ec4f5 1/2: Fix crash destroying NS frame tool bar |
Date: |
Sat, 29 Oct 2022 06:22:41 -0400 (EDT) |
branch: master
commit 6f3d8ec4f5f4107e2a14a0bd154b61e05a4586c7
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>
Fix crash destroying NS frame tool bar
* src/nsterm.m (ns_draw_glyphless_glyph_string_foreground): Work
around silly GCC bug causing splurious warnings.
([EmacsWindow dealloc]): Detach tool bar before dealloc'ing
window. (bug#58857)
---
src/nsterm.m | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/src/nsterm.m b/src/nsterm.m
index 1fc72d83f6..e70463b987 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -4237,7 +4237,12 @@ ns_draw_glyphless_glyph_string_foreground (struct
glyph_string *s)
for (i = 0; i < s->nchars; i++, glyph++)
{
- char buf[7];
+#ifdef GCC_LINT
+ enum { PACIFY_GCC_BUG_81401 = 1 };
+#else
+ enum { PACIFY_GCC_BUG_81401 = 0 };
+#endif
+ char buf[7 + PACIFY_GCC_BUG_81401];
char *str = NULL;
int len = glyph->u.glyphless.len;
@@ -9158,6 +9163,7 @@ ns_create_font_panel_buttons (id target, SEL select, SEL
cancel_action)
NSTRACE ("[EmacsWindow dealloc]");
/* We need to release the toolbar ourselves. */
+ [self setToolbar: nil];
[[self toolbar] release];
/* Also the last button press event . */