Skip to content

Commit

Permalink
Merge pull request nygard#47 from OleksiyA/seg-fault-fix
Browse files Browse the repository at this point in the history
Corrected set-fault when self.name is nil and componentsJoinedByString failing to join such nil components.
  • Loading branch information
nygard committed Oct 18, 2014
2 parents 71b7518 + 1dc1220 commit cce181f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Source/CDTypeName.m
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,9 @@ - (BOOL)isEqual:(id)otherObject;

- (NSString *)description;
{
if ([self.templateTypes count] == 0)
return self.name;
if ([self.templateTypes count] == 0) {
return self.name ? self.name : @"";
}

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

0 comments on commit cce181f

Please sign in to comment.