Browse files

Check if relevant slots are bound when printing MODEL instances

  • Loading branch information...
1 parent ed94569 commit b808dbd7cceea5573f09a1e02abbfb08e20478c7 @Ramarren committed May 21, 2009
Showing with 5 additions and 2 deletions.
  1. +5 −2 family.lisp
@@ -51,8 +51,11 @@ See the Lisp Lesser GNU Public License for more details.
(defmethod print-object ((self model) s)
#+shhh (format s "~a" (type-of self))
- (format s "~a~a" (if (mdead self) "DEAD!" "")
- (or (md-name self) (type-of self))))
+ (if (and (slot-boundp self '.md-state)
+ (slot-boundp self '.md-name))
+ (format s "~a~a" (if (mdead self) "DEAD!" "")
+ (or (md-name self) (type-of self)))
+ (format s "UNINITIALIZED-~a" (type-of self))))
(define-symbol-macro .parent (fm-parent self))
(define-symbol-macro .pa (fm-parent self))

0 comments on commit b808dbd

Please sign in to comment.