Commit e79c38b6 authored by Masamitsu MURASE's avatar Masamitsu MURASE

Check iv.

iv_del should be called in mrb_iv_remove only when t is not NULL.
parent 50d469d9
......@@ -549,7 +549,7 @@ mrb_iv_remove(mrb_state *mrb, mrb_value obj, mrb_sym sym)
iv_tbl *t = mrb_obj_ptr(obj)->iv;
mrb_value val;
if (iv_del(mrb, t, sym, &val)) {
if (t && iv_del(mrb, t, sym, &val)) {
return val;
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment