From de4b63e41d77f370634e6e2916552425efc6d75e Mon Sep 17 00:00:00 2001 From: theraven Date: Thu, 25 Feb 2010 13:31:45 +0000 Subject: [PATCH] Fix for root class using non-fragile ABI. --- init.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/init.c b/init.c index b003550..6f19947 100644 --- a/init.c +++ b/init.c @@ -733,12 +733,12 @@ __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) + long ivar_start = 0; + if (Nil != super && super->instance_size <= 0) { __objc_compute_ivar_offsets(super); + ivar_start = super->instance_size; } - 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 * if this class is compiled with a static ivar layout). We then set the