Index: src/OFBlock.m ================================================================== --- src/OFBlock.m +++ src/OFBlock.m @@ -376,14 +376,38 @@ } @end #if defined(OF_APPLE_RUNTIME) && defined(__OBJC2__) @implementation OFStackBlock ++ (void)load +{ + /* + * Send a message to the class to ensure it's initialized. Otherwise it + * it might not get initialized as blocks are preallocated. + */ + [self class]; +} @end @implementation OFGlobalBlock ++ (void)load +{ + /* + * Send a message to the class to ensure it's initialized. Otherwise it + * it might not get initialized as blocks are preallocated. + */ + [self class]; +} @end @implementation OFMallocBlock ++ (void)load +{ + /* + * Send a message to the class to ensure it's initialized. Otherwise it + * it might not get initialized as blocks are preallocated. + */ + [self class]; +} @end #endif /// \endcond