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-17 11:54:47 +0200
commit33539b983532720eede12768fc5a32c6dabb3ca8 (patch)
treef3b275ed5d12e217981d3b8671fb994deab2304f /Source/SPStringAdditions.m
parent8febe85e1cb92fa7f4fc073607bd8b08f850b446 (diff)
downloadsequelpro-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.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