diff options
author | Max <post@wickenrode.com> | 2015-06-16 21:28:35 +0200 |
---|---|---|
committer | Max <post@wickenrode.com> | 2015-06-17 11:54:47 +0200 |
commit | 33539b983532720eede12768fc5a32c6dabb3ca8 (patch) | |
tree | f3b275ed5d12e217981d3b8671fb994deab2304f /Source/SPStringAdditions.h | |
parent | 8febe85e1cb92fa7f4fc073607bd8b08f850b446 (diff) | |
download | sequelpro-33539b983532720eede12768fc5a32c6dabb3ca8.tar.gz sequelpro-33539b983532720eede12768fc5a32c6dabb3ca8.tar.bz2 sequelpro-33539b983532720eede12768fc5a32c6dabb3ca8.zip |
The export code caused an exception when no database was selected but the filename contained the database token (fixes #2145)
Diffstat (limited to 'Source/SPStringAdditions.h')
-rw-r--r-- | Source/SPStringAdditions.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Source/SPStringAdditions.h b/Source/SPStringAdditions.h index c6871e2a..7c0bfb90 100644 --- a/Source/SPStringAdditions.h +++ b/Source/SPStringAdditions.h @@ -101,3 +101,17 @@ static inline id NSMutableAttributedStringAttributeAtIndex(NSMutableAttributedSt */ - (BOOL)nonConsecutivelySearchString:(NSString *)other matchingRanges:(NSArray **)submatches; @end + +@interface NSMutableString (SPStringAdditions) +/** + * nil-safe variant of setString: + * nil will be interpreted as @"" instead of throwing an exception + */ +- (void)setStringOrNil:(NSString *)aString; + +/** + * nil-safe variant of appendString: + * nil will be interpreted as @"" instead of throwing an exception + */ +- (void)appendStringOrNil:(NSString *)aString; +@end |