From: Dmitry Kalyanov Date: Thu, 29 Oct 2009 12:30:01 +0000 (+0300) Subject: glib: return NIL when g-object foreign type with :already-referenced receives null... X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=9bd4c9189be71ce6b4acaa3c7489fa68054ae228;p=cl-gtk2.git glib: return NIL when g-object foreign type with :already-referenced receives null pointer --- diff --git a/glib/gobject.object.high.lisp b/glib/gobject.object.high.lisp index 887ea2d..80399b8 100644 --- a/glib/gobject.object.high.lisp +++ b/glib/gobject.object.high.lisp @@ -211,7 +211,7 @@ (defmethod translate-from-foreign (pointer (type foreign-g-object-type)) (let ((object (get-g-object-for-pointer pointer))) - (when (foreign-g-object-type-already-referenced type) + (when (and object (foreign-g-object-type-already-referenced type)) (g-object-unref (pointer object))) object))