summaryrefslogtreecommitdiff
path: root/src/nsterm.m
diff options
context:
space:
mode:
authorPo Lu <luangruo@yahoo.com>2022-10-29 18:21:09 +0800
committerPo Lu <luangruo@yahoo.com>2022-10-29 18:22:28 +0800
commit6f3d8ec4f5f4107e2a14a0bd154b61e05a4586c7 (patch)
tree66a7924df08bf5b70a742ab17cf5e83f1e0230f3 /src/nsterm.m
parentdfde4fc82b1b11f19edaf795ce62e8d5ff25f9ff (diff)
downloademacs-6f3d8ec4f5f4107e2a14a0bd154b61e05a4586c7.tar.gz
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)
Diffstat (limited to 'src/nsterm.m')
-rw-r--r--src/nsterm.m8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/nsterm.m b/src/nsterm.m
index 1fc72d83f66..e70463b9877 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 . */