diff options
| author | Eli Zaretskii | 2015-12-26 12:43:08 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2015-12-26 12:43:08 +0200 |
| commit | 23c3caf6025f1cbe37781ceb359fac2c67268f45 (patch) | |
| tree | cab5c00f92af6cc63daf5f4c10078872fb583761 /src | |
| parent | 490dcf2ae3f05baf201a451e701bc08d227ddc29 (diff) | |
| download | emacs-23c3caf6025f1cbe37781ceb359fac2c67268f45.tar.gz emacs-23c3caf6025f1cbe37781ceb359fac2c67268f45.zip | |
Avoid assertion violation in unbind_to
* src/eval.c (unbind_to) <SPECPDL_LET>: Avoid assertion violation
if we get here with an object that is not a symbol. (Bug#14412)
Diffstat (limited to 'src')
| -rw-r--r-- | src/eval.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/eval.c b/src/eval.c index d04796abc3a..571681c318f 100644 --- a/src/eval.c +++ b/src/eval.c | |||
| @@ -3196,11 +3196,15 @@ unbind_to (ptrdiff_t count, Lisp_Object value) | |||
| 3196 | { /* If variable has a trivial value (no forwarding), we can | 3196 | { /* If variable has a trivial value (no forwarding), we can |
| 3197 | just set it. No need to check for constant symbols here, | 3197 | just set it. No need to check for constant symbols here, |
| 3198 | since that was already done by specbind. */ | 3198 | since that was already done by specbind. */ |
| 3199 | struct Lisp_Symbol *sym = XSYMBOL (specpdl_symbol (specpdl_ptr)); | 3199 | Lisp_Object symbol = specpdl_symbol (specpdl_ptr); |
| 3200 | if (sym->redirect == SYMBOL_PLAINVAL) | 3200 | if (SYMBOLP (symbol)) |
| 3201 | { | 3201 | { |
| 3202 | SET_SYMBOL_VAL (sym, specpdl_old_value (specpdl_ptr)); | 3202 | struct Lisp_Symbol *sym = XSYMBOL (symbol); |
| 3203 | break; | 3203 | if (sym->redirect == SYMBOL_PLAINVAL) |
| 3204 | { | ||
| 3205 | SET_SYMBOL_VAL (sym, specpdl_old_value (specpdl_ptr)); | ||
| 3206 | break; | ||
| 3207 | } | ||
| 3204 | } | 3208 | } |
| 3205 | else | 3209 | else |
| 3206 | { /* FALLTHROUGH!! | 3210 | { /* FALLTHROUGH!! |