summaryrefslogtreecommitdiffhomepage
path: root/src/class.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/class.c')
-rw-r--r--src/class.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/class.c b/src/class.c
index c761f46af..a9439d7d7 100644
--- a/src/class.c
+++ b/src/class.c
@@ -1763,10 +1763,10 @@ mrb_class_path(mrb_state *mrb, struct RClass *c)
MRB_API struct RClass*
mrb_class_real(struct RClass* cl)
{
- if (cl == 0)
- return NULL;
+ if (cl == 0) return NULL;
while ((cl->tt == MRB_TT_SCLASS) || (cl->tt == MRB_TT_ICLASS)) {
cl = cl->super;
+ if (cl == 0) return NULL;
}
return cl;
}