summaryrefslogtreecommitdiff
path: root/vm_core.h
diff options
context:
space:
mode:
Diffstat (limited to 'vm_core.h')
-rw-r--r--vm_core.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/vm_core.h b/vm_core.h
index 3691d13fa5..f2ea983d36 100644
--- a/vm_core.h
+++ b/vm_core.h
@@ -1406,6 +1406,7 @@ vm_proc_ep(VALUE procval)
static inline const rb_iseq_t *
vm_block_iseq(const struct rb_block *block)
{
+ if (!block) return NULL;
switch (vm_block_type(block)) {
case block_type_iseq: return rb_iseq_check(block->as.captured.code.iseq);
case block_type_proc: return vm_proc_iseq(block->as.proc);