in slot-boundp-using-class, check that pointer slot is bound before checking its...
authorDmitry Kalyanov <Kalyanov.Dmitry@gmail.com>
Sun, 4 Oct 2009 11:44:04 +0000 (15:44 +0400)
committerDmitry Kalyanov <Kalyanov.Dmitry@gmail.com>
Sun, 4 Oct 2009 11:44:04 +0000 (15:44 +0400)
glib/gobject.meta.lisp

index 55a48ab..f987ad0 100755 (executable)
 
 (defmethod slot-boundp-using-class ((class gobject-class) object (slot gobject-property-effective-slot-definition))
   (handler-case
-      (and (pointer object)
+      (and (slot-boundp object 'pointer)
+           (pointer object)
            (progn (g-object-property-type (pointer object) (gobject-property-effective-slot-definition-g-property-name slot) :assert-readable t) t))
     (property-unreadable-error () nil)))
 
   new-value)
 
 (defmethod slot-boundp-using-class ((class gobject-class) object (slot gobject-fn-effective-slot-definition))
-  (and (pointer object)
+  (and (slot-boundp object 'pointer)
+       (pointer object)
        (not (null (gobject-fn-effective-slot-definition-g-getter-fn slot)))))
 
 (defmethod slot-value-using-class ((class gobject-class) object (slot gobject-fn-effective-slot-definition))
   new-value)
 
 (defmethod slot-boundp-using-class ((class gobject-class) object (slot gobject-effective-slot-definition))
-  t)
+  (slot-boundp object 'pointer))
 
 (defmethod slot-makunbound-using-class ((class gobject-class) object (slot gobject-effective-slot-definition))
   nil)