aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPStringAdditions.m
diff options
context:
space:
mode:
authorMax <post@wickenrode.com>2015-06-16 21:28:35 +0200
committerMax <post@wickenrode.com>2015-06-16 21:28:35 +0200
commitf37ff9634d285d8d8f197d80ed29171dc9258270 (patch)
tree120229228ed8ed08cc05873b5411d4dad75ede63 /Source/SPStringAdditions.m
parentb7b9b155a9938e3b8f570144e9cb35ce4ed7df57 (diff)
downloadsequelpro-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.m14
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