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
This commit is contained in:
parent
45cdc834c4
commit
18c7978161
2
vm.c
2
vm.c
@ -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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user