From 1ff4b3f800d369510658b7926a1d6dc9327d0422 Mon Sep 17 00:00:00 2001 From: Clayton Smith Date: Thu, 24 Nov 2016 15:51:25 -0500 Subject: Fix segfault in mrb_proc_copy. --- src/proc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/proc.c') diff --git a/src/proc.c b/src/proc.c index 4f770932b..470547094 100644 --- a/src/proc.c +++ b/src/proc.c @@ -140,7 +140,7 @@ mrb_proc_copy(struct RProc *a, struct RProc *b) { a->flags = b->flags; a->body = b->body; - if (!MRB_PROC_CFUNC_P(a)) { + if (!MRB_PROC_CFUNC_P(a) && a->body.irep) { a->body.irep->refcnt++; } a->target_class = b->target_class; -- cgit v1.2.3