check for nil superclass before dereferencing

main
rfm 16 years ago
parent fa488d6cea
commit d89b28c40c

@ -733,11 +733,11 @@ __objc_compute_ivar_offsets (Class class)
if (class->instance_size <= 0)
{
Class super = class_superclass_of_class(class);
if (Nil == super) { return; }
if (super->instance_size <= 0)
{
__objc_compute_ivar_offsets(super);
}
if (Nil == super) { return; }
long ivar_start = super->instance_size;
class->instance_size = ivar_start - class->instance_size;
/* For each instance variable, we add the offset if required (it will be zero

Loading…
Cancel
Save