diff options
author | normal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-07-03 09:06:28 +0000 |
---|---|---|
committer | normal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-07-03 09:06:28 +0000 |
commit | 18c79781616f3a1d502c3c4061da2d8893f1e4ca (patch) | |
tree | 182ab89fa8c4b940773931bedf409df7c09e26a6 /vm.c | |
parent | 45cdc834c4b25b09d9263fc4b6a6c2b6432abdc6 (diff) |
vm.c (rb_source_location): check for NULL cfp->iseq
rb_vm_get_sourceline returns zero if cfp->iseq is NULL,
so rb_iseq_path should not try to follow NULL cfp->iseq,
either.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63837 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm.c')
-rw-r--r-- | vm.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1291,7 +1291,7 @@ rb_source_location(int *pline) const rb_execution_context_t *ec = GET_EC(); const rb_control_frame_t *cfp = rb_vm_get_ruby_level_next_cfp(ec, ec->cfp); - if (cfp) { + if (cfp && cfp->iseq) { if (pline) *pline = rb_vm_get_sourceline(cfp); return rb_iseq_path(cfp->iseq); } |