diff options
author | Max <post@wickenrode.com> | 2015-06-16 21:28:35 +0200 |
---|---|---|
committer | Max <post@wickenrode.com> | 2015-06-16 21:28:35 +0200 |
commit | f37ff9634d285d8d8f197d80ed29171dc9258270 (patch) | |
tree | 120229228ed8ed08cc05873b5411d4dad75ede63 /Source/SPStringAdditions.m | |
parent | b7b9b155a9938e3b8f570144e9cb35ce4ed7df57 (diff) | |
download | sequelpro-f37ff9634d285d8d8f197d80ed29171dc9258270.tar.gz sequelpro-f37ff9634d285d8d8f197d80ed29171dc9258270.tar.bz2 sequelpro-f37ff9634d285d8d8f197d80ed29171dc9258270.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.m')
-rw-r--r-- | Source/SPStringAdditions.m | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Source/SPStringAdditions.m b/Source/SPStringAdditions.m index 0254dc36..ebd81a54 100644 --- a/Source/SPStringAdditions.m +++ b/Source/SPStringAdditions.m @@ -562,3 +562,17 @@ static NSInteger _smallestOf(NSInteger a, NSInteger b, NSInteger c) return min; } + +@implementation NSMutableString (SPStringAdditions) + +- (void)setStringOrNil:(NSString *)aString +{ + [self setString:(aString? aString : @"")]; +} + +- (void)appendStringOrNil:(NSString *)aString +{ + [self appendString:(aString? aString : @"")]; +} + +@end |