diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/term.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/term.c b/src/term.c index a2ae8c2c6f0..065bce45d3c 100644 --- a/src/term.c +++ b/src/term.c | |||
| @@ -155,12 +155,16 @@ tty_ring_bell (struct frame *f) | |||
| 155 | static void | 155 | static void |
| 156 | tty_send_additional_strings (struct terminal *terminal, Lisp_Object sym) | 156 | tty_send_additional_strings (struct terminal *terminal, Lisp_Object sym) |
| 157 | { | 157 | { |
| 158 | Lisp_Object lisp_terminal; | 158 | /* Use only accessors like CDR_SAFE and assq_no_quit to avoid any |
| 159 | Lisp_Object extra_codes; | 159 | form of quitting or signaling an error, since this function can |
| 160 | run as part of the "emergency escape" procedure invoked in the | ||
| 161 | middle of GC, where quitting means crashing (Bug#17406). */ | ||
| 162 | if (! terminal->name) | ||
| 163 | return; | ||
| 160 | struct tty_display_info *tty = terminal->display_info.tty; | 164 | struct tty_display_info *tty = terminal->display_info.tty; |
| 161 | 165 | ||
| 162 | XSETTERMINAL (lisp_terminal, terminal); | 166 | for (Lisp_Object extra_codes |
| 163 | for (extra_codes = Fterminal_parameter (lisp_terminal, sym); | 167 | = CDR_SAFE (assq_no_quit (sym, terminal->param_alist)); |
| 164 | CONSP (extra_codes); | 168 | CONSP (extra_codes); |
| 165 | extra_codes = XCDR (extra_codes)) | 169 | extra_codes = XCDR (extra_codes)) |
| 166 | { | 170 | { |