vm.c: target class may be NULL.

This commit is contained in:
Yukihiro "Matz" Matsumoto
2022-04-01 16:40:06 +09:00
parent d1f1b4ea38
commit 00acae117d
+1 -1
View File
@@ -1749,7 +1749,7 @@ RETRY_TRY_BLOCK:
}
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;
}
}