Skip to content

Commit

Permalink
vm.c: target class may be NULL.
Browse files Browse the repository at this point in the history
  • Loading branch information
matz committed Apr 1, 2022
1 parent d1f1b4e commit 00acae1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/vm.c
Expand Up @@ -1749,7 +1749,7 @@ mrb_vm_exec(mrb_state *mrb, const struct RProc *proc, const mrb_code *pc)
}
else if (target_class->tt == MRB_TT_MODULE) {
target_class = mrb_vm_ci_target_class(ci);
if (target_class->tt != MRB_TT_ICLASS) {
if (!target_class || target_class->tt != MRB_TT_ICLASS) {
goto super_typeerror;
}
}
Expand Down

0 comments on commit 00acae1

Please sign in to comment.