Be defensive about checking for key beginning with @

This commit is contained in:
Richard Frith-Macdonald 2020-11-18 09:09:48 +00:00
parent d4df4b6d87
commit e7035cadf3

View file

@ -1240,7 +1240,7 @@ compareIt(id o1, id o2, void* context)
{
id o;
if ([key hasPrefix: @"@"] == YES)
if ([key isKindOfClass: [NSString class]] && [key hasPrefix: @"@"])
{
o = [super valueForKey: [key substringFromIndex: 1]];
}