From 3fab07e7cf66542c137a8150ed62a6a3a3affe0b Mon Sep 17 00:00:00 2001 From: Matthias Benkard Date: Wed, 5 Mar 2008 18:31:49 +0100 Subject: COLLECT-METHODS: Do not free NULL pointers. darcs-hash:c65fd128ad2ff1b86c866e1982dc4ad7e5e884c5 --- Lisp/libobjcl.lisp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Lisp/libobjcl.lisp') diff --git a/Lisp/libobjcl.lisp b/Lisp/libobjcl.lisp index f733211..a1e25cb 100644 --- a/Lisp/libobjcl.lisp +++ b/Lisp/libobjcl.lisp @@ -938,7 +938,8 @@ separating parts by hyphens works nicely in all of the `:INVERT`, :pointer (%objcl-method-selector (mem-aref method-array :pointer i)))) - (foreign-free method-array)))))) + (unless (zerop (mem-ref count-buf :unsigned-int)) + (foreign-free method-array))))))) (collect-methods class) (collect-methods (%objcl-class-metaclass class)))) -- cgit v1.2.3