Index: src/OFObject+KeyValueCoding.m ================================================================== --- src/OFObject+KeyValueCoding.m +++ src/OFObject+KeyValueCoding.m @@ -45,10 +45,13 @@ { SEL selector = sel_registerName([key UTF8String]); const char *typeEncoding = [self typeEncodingForSelector: selector]; id ret; + if (typeEncoding == NULL) + return [self valueForUndefinedKey: key]; + switch (nextType(&typeEncoding)) { case '@': ret = [self performSelector: selector]; break; #define CASE(encoding, type, method) \ @@ -119,12 +122,12 @@ free(name); typeEncoding = [self typeEncodingForSelector: selector]; - if (nextType(&typeEncoding) != 'v' || nextType(&typeEncoding) != '@' || - nextType(&typeEncoding) != ':') { + if (typeEncoding == NULL || nextType(&typeEncoding) != 'v' || + nextType(&typeEncoding) != '@' || nextType(&typeEncoding) != ':') { [self setValue: value forUndefinedKey: key]; return; }