diff --git a/libguile/r6rs-ports.c b/libguile/r6rs-ports.c index f10afe6d5..d77c2147a 100644 --- a/libguile/r6rs-ports.c +++ b/libguile/r6rs-ports.c @@ -211,7 +211,10 @@ static SCM cbp_mark (SCM port) { /* Mark the underlying method and object vector. */ - return (SCM_PACK (SCM_STREAM (port))); + if (SCM_OPENP (port)) + return SCM_PACK (SCM_STREAM (port)); + else + return SCM_BOOL_F; } static off_t