From 4b6596aebd1fea78945881123c68a6aeb62bdb05 Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Sun, 3 Mar 2024 13:43:02 -0800 Subject: Fix crash when undefined function called in lisp.lsp Reported-by: Gregory James DUCK Closes: #1 Signed-off-by: Alan Coopersmith --- lisp/lisp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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(); -- cgit v1.2.3