Commit 23c3caf6 authored by Eli Zaretskii's avatar Eli Zaretskii

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)
parent 490dcf2a
......@@ -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!!
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment