Skip to content

Commit 1dc1220

Browse files
author
Oleksiy Ivanov
committed
Corrected set-fault when self.name is nil and componentsJoinedByString failing to join such nil components.
1 parent 71b7518 commit 1dc1220

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Source/CDTypeName.m

+3-2
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,9 @@ - (BOOL)isEqual:(id)otherObject;
5353

5454
- (NSString *)description;
5555
{
56-
if ([self.templateTypes count] == 0)
57-
return self.name;
56+
if ([self.templateTypes count] == 0) {
57+
return self.name ? self.name : @"";
58+
}
5859

5960
if (self.suffix != nil)
6061
return [NSString stringWithFormat:@"%@<%@>%@", self.name, [self.templateTypes componentsJoinedByString:@", "], self.suffix];

0 commit comments

Comments
 (0)