aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEli Zaretskii2015-12-26 12:43:08 +0200
committerEli Zaretskii2015-12-26 12:43:08 +0200
commit23c3caf6025f1cbe37781ceb359fac2c67268f45 (patch)
treecab5c00f92af6cc63daf5f4c10078872fb583761 /src
parent490dcf2ae3f05baf201a451e701bc08d227ddc29 (diff)
downloademacs-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.c12
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!!