1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-29 16:30:19 +02:00

Fix crash when marking closed custom bytevector port

* libguile/r6rs-ports.c (cbp_mark): A closed port will have had its
  stream destroyed, so don't dereference the stream in that case. Patch by
  Mike Gran.
This commit is contained in:
Andy Wingo 2009-06-21 12:41:46 +02:00
parent 179fe33632
commit 8806afa7dd

View file

@ -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