aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPArrayAdditions.m
diff options
context:
space:
mode:
authorMax <post@wickenrode.com>2014-08-01 01:18:44 +0200
committerMax <post@wickenrode.com>2014-08-01 01:18:44 +0200
commit2570a91dd1e1d7b88b908db33494baeaa5001e74 (patch)
treec48635205db38479c7ef05b05c394169317271bc /Source/SPArrayAdditions.m
parentb2e63fad01ca76b9090c1a0adbd999990d817846 (diff)
downloadsequelpro-2570a91dd1e1d7b88b908db33494baeaa5001e74.tar.gz
sequelpro-2570a91dd1e1d7b88b908db33494baeaa5001e74.tar.bz2
sequelpro-2570a91dd1e1d7b88b908db33494baeaa5001e74.zip
Fix for exception on export (#1968)
This fixes an exception that would happen if three conditions were met: 1) No database was selected or it was empty 2) A custom export filename was set 3) You tried to export the result of a custom query
Diffstat (limited to 'Source/SPArrayAdditions.m')
-rw-r--r--Source/SPArrayAdditions.m7
1 files changed, 7 insertions, 0 deletions
diff --git a/Source/SPArrayAdditions.m b/Source/SPArrayAdditions.m
index 91af56e4..0fe75483 100644
--- a/Source/SPArrayAdditions.m
+++ b/Source/SPArrayAdditions.m
@@ -145,4 +145,11 @@
return subArray;
}
+- (id)objectOrNilAtIndex:(NSUInteger)index
+{
+ if([self count] <= index)
+ return nil;
+ return [self objectAtIndex:index];
+}
+
@end