variable.c (mrb_mod_cv_get): c must not be NULL as an argument

This commit is contained in:
Yukihiro "Matz" Matsumoto
2025-04-12 21:45:25 +09:00
parent 90d77e71f5
commit e08452585e
+1 -1
View File
@@ -624,7 +624,7 @@ mrb_mod_cv_get(mrb_state *mrb, struct RClass *c, mrb_sym sym)
c = c->super;
}
if (given) return v;
if (cls && cls->tt == MRB_TT_SCLASS) {
if (cls->tt == MRB_TT_SCLASS) {
mrb_value klass;
klass = mrb_obj_iv_get(mrb, (struct RObject*)cls, MRB_SYM(__attached__));