aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Source/SPQueryController.m1
-rw-r--r--Source/TableDocument.m10
2 files changed, 10 insertions, 1 deletions
diff --git a/Source/SPQueryController.m b/Source/SPQueryController.m
index 422e1f59..8d38e72f 100644
--- a/Source/SPQueryController.m
+++ b/Source/SPQueryController.m
@@ -509,6 +509,7 @@ static SPQueryController *sharedQueryController = nil;
NSArray *allDocs = [[NSDocumentController sharedDocumentController] documents];
NSMutableArray *allURLs = [NSMutableArray array];
for(id doc in allDocs) {
+ if (![doc fileURL]) continue;
if([allURLs containsObject:[doc fileURL]])
return;
else
diff --git a/Source/TableDocument.m b/Source/TableDocument.m
index 83b68bd4..c419bd1e 100644
--- a/Source/TableDocument.m
+++ b/Source/TableDocument.m
@@ -261,7 +261,7 @@
NSData *pData = [NSData dataWithContentsOfFile:path options:NSUncachedRead error:&readError];
spf = [[NSPropertyListSerialization propertyListFromData:pData
- mutabilityOption:NSPropertyListImmutable format:&format errorDescription:&convError] autorelease];
+ mutabilityOption:NSPropertyListImmutable format:&format errorDescription:&convError] retain];
if(!spf || readError != nil || [convError length] || !(format == NSPropertyListXMLFormat_v1_0 || format == NSPropertyListBinaryFormat_v1_0)) {
NSAlert *alert = [NSAlert alertWithMessageText:[NSString stringWithFormat:NSLocalizedString(@"Error while reading connection data file", @"error while reading connection data file")]
@@ -279,6 +279,7 @@
// For dispatching later
if(![[spf objectForKey:@"format"] isEqualToString:@"connection"]) {
NSLog(@"SPF file format is not 'connection'.");
+ [spf release];
[self close];
return;
}
@@ -292,6 +293,7 @@
[alert setAlertStyle:NSCriticalAlertStyle];
[alert runModal];
+ [spf release];
[self close];
return;
}
@@ -332,6 +334,7 @@
encryptpw = [inputTextWindowSecureTextField stringValue];
else {
[self close];
+ [spf release];
return;
}
@@ -357,6 +360,7 @@
[alert setAlertStyle:NSCriticalAlertStyle];
[alert runModal];
[self close];
+ [spf release];
return;
}
}
@@ -371,6 +375,7 @@
[alert setAlertStyle:NSCriticalAlertStyle];
[alert runModal];
[self close];
+ [spf release];
return;
}
@@ -385,6 +390,7 @@
[alert setAlertStyle:NSCriticalAlertStyle];
[alert runModal];
[self close];
+ [spf release];
return;
}
@@ -485,6 +491,7 @@
[spfDocData setObject:[NSNumber numberWithBool:YES] forKey:@"auto_connect"];
[connectionController initiateConnection:self];
}
+ [spf release];
}
/**
@@ -2395,6 +2402,7 @@
// For dispatching later
if(![[spf objectForKey:@"format"] isEqualToString:@"connection"]) {
NSLog(@"SPF file format is not 'connection'.");
+ [spf release];
return NO;
}