From fa488d6cea1c2d2e03cd2d66d7ed4b9d938742d2 Mon Sep 17 00:00:00 2001 From: theraven Date: Thu, 25 Feb 2010 12:59:12 +0000 Subject: [PATCH] Fix for non-fragile ivar fixup when classes are loaded in the wrong order. --- init.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/init.c b/init.c index 02a2652..80a8242 100644 --- a/init.c +++ b/init.c @@ -733,6 +733,10 @@ __objc_compute_ivar_offsets (Class class) if (class->instance_size <= 0) { Class super = class_superclass_of_class(class); + 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;