diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2024-03-03 13:43:02 -0800 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2024-03-03 13:44:09 -0800 |
commit | 4b6596aebd1fea78945881123c68a6aeb62bdb05 (patch) | |
tree | ea6b229a3ad6ccd647b6a96f66382da4d02a09e6 /lisp | |
parent | 0d0f06bc317fa4e65b9689bbfa0565a7ba7bc013 (diff) |
Fix crash when undefined function called in lisp.lsp
Reported-by: Gregory James DUCK <gjduck@gmail.com>
Closes: #1
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/lisp.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/lisp.c b/lisp/lisp.c index a533beb..11a4c04 100644 --- a/lisp/lisp.c +++ b/lisp/lisp.c @@ -697,7 +697,8 @@ LispDestroy(const char *fmt, ...) lisp__data.mem.index = 0; /* If the package was changed and an error happened */ - PACKAGE = lisp__data.savepackage; + if (lisp__data.savepackage != NULL) + PACKAGE = lisp__data.savepackage; lisp__data.pack = lisp__data.savepack; LispTopLevel(); |