diff options
| author | Po Lu | 2022-10-29 18:21:09 +0800 |
|---|---|---|
| committer | Po Lu | 2022-10-29 18:22:28 +0800 |
| commit | 6f3d8ec4f5f4107e2a14a0bd154b61e05a4586c7 (patch) | |
| tree | 66a7924df08bf5b70a742ab17cf5e83f1e0230f3 /src | |
| parent | dfde4fc82b1b11f19edaf795ce62e8d5ff25f9ff (diff) | |
| download | emacs-6f3d8ec4f5f4107e2a14a0bd154b61e05a4586c7.tar.gz emacs-6f3d8ec4f5f4107e2a14a0bd154b61e05a4586c7.zip | |
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')
| -rw-r--r-- | src/nsterm.m | 8 |
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) | |||
| 4237 | 4237 | ||
| 4238 | for (i = 0; i < s->nchars; i++, glyph++) | 4238 | for (i = 0; i < s->nchars; i++, glyph++) |
| 4239 | { | 4239 | { |
| 4240 | char buf[7]; | 4240 | #ifdef GCC_LINT |
| 4241 | enum { PACIFY_GCC_BUG_81401 = 1 }; | ||
| 4242 | #else | ||
| 4243 | enum { PACIFY_GCC_BUG_81401 = 0 }; | ||
| 4244 | #endif | ||
| 4245 | char buf[7 + PACIFY_GCC_BUG_81401]; | ||
| 4241 | char *str = NULL; | 4246 | char *str = NULL; |
| 4242 | int len = glyph->u.glyphless.len; | 4247 | int len = glyph->u.glyphless.len; |
| 4243 | 4248 | ||
| @@ -9158,6 +9163,7 @@ ns_create_font_panel_buttons (id target, SEL select, SEL cancel_action) | |||
| 9158 | NSTRACE ("[EmacsWindow dealloc]"); | 9163 | NSTRACE ("[EmacsWindow dealloc]"); |
| 9159 | 9164 | ||
| 9160 | /* We need to release the toolbar ourselves. */ | 9165 | /* We need to release the toolbar ourselves. */ |
| 9166 | [self setToolbar: nil]; | ||
| 9161 | [[self toolbar] release]; | 9167 | [[self toolbar] release]; |
| 9162 | 9168 | ||
| 9163 | /* Also the last button press event . */ | 9169 | /* Also the last button press event . */ |