Skip to content

Commit

Permalink
don't die trying to set the text to nil
Browse files Browse the repository at this point in the history
  • Loading branch information
joshaber committed Jun 26, 2012
1 parent d98197d commit 23363bc
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/UIKit/TUIAttributedString.m
Expand Up @@ -243,6 +243,8 @@ - (NSString *)text {
} }


- (void)setText:(NSString *)text { - (void)setText:(NSString *)text {
text = text ? : @" ";

[self beginEditing]; [self beginEditing];
[self replaceCharactersInRange:NSMakeRange(0, [self length]) withString:[text copy]]; [self replaceCharactersInRange:NSMakeRange(0, [self length]) withString:[text copy]];
[self endEditing]; [self endEditing];
Expand Down

0 comments on commit 23363bc

Please sign in to comment.