1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-28 07:45:00 +00:00

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)
This commit is contained in:
Eli Zaretskii 2015-12-26 12:43:08 +02:00
parent 490dcf2ae3
commit 23c3caf602

View File

@ -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!!