summaryrefslogtreecommitdiff
path: root/Lisp/data-types.lisp
diff options
context:
space:
mode:
Diffstat (limited to 'Lisp/data-types.lisp')
-rw-r--r--Lisp/data-types.lisp4
1 files changed, 3 insertions, 1 deletions
diff --git a/Lisp/data-types.lisp b/Lisp/data-types.lisp
index 606c0c4..b22057f 100644
--- a/Lisp/data-types.lisp
+++ b/Lisp/data-types.lisp
@@ -163,7 +163,9 @@ an __exception__, you can simply send it the `self' message.
(defun dealloc-obj-data (obj-data)
(with-foreign-slots ((type data) obj-data obj-data)
- (foreign-string-free type))
+ (when (and (pointerp type)
+ (not (null-pointer-p type)))
+ (foreign-string-free type)))
(foreign-free obj-data))