From 9bd4c9189be71ce6b4acaa3c7489fa68054ae228 Mon Sep 17 00:00:00 2001 From: Dmitry Kalyanov Date: Thu, 29 Oct 2009 15:30:01 +0300 Subject: [PATCH] glib: return NIL when g-object foreign type with :already-referenced receives null pointer --- glib/gobject.object.high.lisp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)) -- 1.7.10.4