From: Eli Zaretskii Date: Sat, 26 Dec 2015 10:43:08 +0000 (+0200) Subject: Avoid assertion violation in unbind_to X-Git-Tag: emacs-25.0.90~380 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=23c3caf6025f1cbe37781ceb359fac2c67268f45;p=emacs.git Avoid assertion violation in unbind_to * src/eval.c (unbind_to) : Avoid assertion violation if we get here with an object that is not a symbol. (Bug#14412) --- 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) { /* If variable has a trivial value (no forwarding), we can just set it. No need to check for constant symbols here, since that was already done by specbind. */ - struct Lisp_Symbol *sym = XSYMBOL (specpdl_symbol (specpdl_ptr)); - if (sym->redirect == SYMBOL_PLAINVAL) + Lisp_Object symbol = specpdl_symbol (specpdl_ptr); + if (SYMBOLP (symbol)) { - SET_SYMBOL_VAL (sym, specpdl_old_value (specpdl_ptr)); - break; + struct Lisp_Symbol *sym = XSYMBOL (symbol); + if (sym->redirect == SYMBOL_PLAINVAL) + { + SET_SYMBOL_VAL (sym, specpdl_old_value (specpdl_ptr)); + break; + } } else { /* FALLTHROUGH!!