mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-30 08:50:23 +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:
parent
179fe33632
commit
8806afa7dd
1 changed files with 4 additions and 1 deletions
|
@ -211,7 +211,10 @@ static SCM
|
||||||
cbp_mark (SCM port)
|
cbp_mark (SCM port)
|
||||||
{
|
{
|
||||||
/* Mark the underlying method and object vector. */
|
/* 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
|
static off_t
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue