diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2017-12-02 01:08:48 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2017-12-04 08:56:11 +0900 |
| commit | 5d04e3316bc96c0df6084c0bf6020e3038837ad3 (patch) | |
| tree | 7e1aa0d6c83a5a7715756bb13c47a6842109fc61 /src | |
| parent | ff8b608c52a4364fdf5896d4c600018d907dfc95 (diff) | |
| download | mruby-5d04e3316bc96c0df6084c0bf6020e3038837ad3.tar.gz mruby-5d04e3316bc96c0df6084c0bf6020e3038837ad3.zip | |
Check if `ci->proc` is not `NULL` and `MRB_PROC_CFUNC_P()`; fix #3867
Diffstat (limited to 'src')
| -rw-r--r-- | src/vm.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -327,7 +327,8 @@ ecall(mrb_state *mrb) mrb_assert(!MRB_PROC_CFUNC_P(p)); c->ensure[i] = NULL; nregs = p->upper->body.irep->nregs; - if (ci->proc->body.irep->nregs > nregs) { + if (ci->proc && !MRB_PROC_CFUNC_P(ci->proc) && + ci->proc->body.irep->nregs > nregs) { nregs = ci->proc->body.irep->nregs; } cioff = ci - c->cibase; |
