Protect add-variable-watcher from incorrect usage
* src/data.c (Fadd_variable_watcher): Avoid crashes if SYMBOL isn't. (Bug#47462)
This commit is contained in:
parent
afc214f139
commit
a1e454d6df
1 changed files with 1 additions and 0 deletions
|
@ -1589,6 +1589,7 @@ All writes to aliases of SYMBOL will call WATCH-FUNCTION too. */)
|
|||
(Lisp_Object symbol, Lisp_Object watch_function)
|
||||
{
|
||||
symbol = Findirect_variable (symbol);
|
||||
CHECK_SYMBOL (symbol);
|
||||
set_symbol_trapped_write (symbol, SYMBOL_TRAPPED_WRITE);
|
||||
map_obarray (Vobarray, harmonize_variable_watchers, symbol);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue