class_getClassMethod() does not handle Nil class correctly

This commit is contained in:
Glenn Ganz 2012-01-16 17:39:03 +01:00
parent 2ad50d855c
commit bbd41925ea

View File

@ -226,7 +226,10 @@ int class_getVersion(Class class) {
Method class_getClassMethod(Class class, SEL selector)
{
return class_getInstanceMethod(class->isa, selector);
if (class == Nil) {
return NULL;
}
return class_getInstanceMethod(class->isa, selector);
}
Ivar class_getClassVariable(Class cls,const char *name) {