summaryrefslogtreecommitdiff
path: root/vm.c
diff options
context:
space:
mode:
Diffstat (limited to 'vm.c')
-rw-r--r--vm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/vm.c b/vm.c
index 258c1b5942..1f09411d39 100644
--- a/vm.c
+++ b/vm.c
@@ -2514,7 +2514,7 @@ rb_execution_context_mark(const rb_execution_context_t *ec)
#endif
/* mark VM stack */
- if (ec->vm_stack) {
+ if (ec->vm_stack && ec->cfp) {
VALUE *p = ec->vm_stack;
VALUE *sp = ec->cfp->sp;
rb_control_frame_t *cfp = ec->cfp;