From aa90c52e43d32d88d4a0fd8d1a42714a1a0adff6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Fri, 8 Mar 2019 13:53:37 +0100 Subject: Fix error when looking at cloned events. --- strbuf.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'strbuf.c') diff --git a/strbuf.c b/strbuf.c index 455100a2..0e56468b 100644 --- a/strbuf.c +++ b/strbuf.c @@ -70,7 +70,10 @@ int DEEP_COPY(strbuf)(strbuf* dest, strbuf* src) { } if (src->scm != NULL) { + /* The magic SCM type is copied when reassigned. */ dest->scm = src->scm; + /* NOTE This is a bit of a leaky abstraction. */ + scm_gc_protect_object(dest->scm); } dest->len = src->len; -- cgit v1.2.3