diff options
author | Matthias Benkard <code@mail.matthias.benkard.de> | 2007-08-03 15:09:21 +0200 |
---|---|---|
committer | Matthias Benkard <code@mail.matthias.benkard.de> | 2007-08-03 15:09:21 +0200 |
commit | 2841f04d147c3f640e5a0b9787f5823a5f53e692 (patch) | |
tree | 59ebbe539985609262b7dff99aa7a5654e2fe76c | |
parent | 4b6286e29cf106584566c6d77009f3a4b3e3ed39 (diff) |
OBJCL-FIND-CLASS: Return NIL if no class is found.
darcs-hash:c0f56365377654d35fddd76e9bf2a49f053b6bb3
-rw-r--r-- | objcl.lisp | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -241,11 +241,16 @@ (case lisp-type ((objc-id objc-class objc-selector) (make-instance lisp-type :pointer value)) - (otherwise value))))) + (otherwise value))))) (defun objcl-find-class (class-name) (let ((obj-data (%objcl-find-class class-name))) (prog1 - (obj-data->lisp obj-data) + (if (null-pointer-p (foreign-slot-value + (foreign-slot-value obj-data 'obj-data 'data) + 'obj-data-union + 'id-val)) + nil + (obj-data->lisp obj-data)) (dealloc-obj-data obj-data)))) |