From d89b28c40cd03760a681ab9023f47ef5a7ff13be Mon Sep 17 00:00:00 2001 From: rfm Date: Thu, 25 Feb 2010 13:18:02 +0000 Subject: [PATCH] check for nil superclass before dereferencing --- init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init.c b/init.c index 80a8242..b003550 100644 --- a/init.c +++ b/init.c @@ -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