aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPDatabaseDocument.m
diff options
context:
space:
mode:
authorStuart Connolly <stuart02@gmail.com>2017-03-30 01:44:38 +0100
committerStuart Connolly <stuart02@gmail.com>2017-03-30 01:44:38 +0100
commitdb0335a4eff4a04d044f5cbd617fd21c0bec8932 (patch)
treedbb442e38975f5958c6b5004f22e913610fff248 /Source/SPDatabaseDocument.m
parentdd2df6369dba304178e98fa2d15f2b53f2dabcdf (diff)
parent64929b3d810d8c18367ba869cba726f2360978d1 (diff)
downloadsequelpro-db0335a4eff4a04d044f5cbd617fd21c0bec8932.tar.gz
sequelpro-db0335a4eff4a04d044f5cbd617fd21c0bec8932.tar.bz2
sequelpro-db0335a4eff4a04d044f5cbd617fd21c0bec8932.zip
Merge branch 'master' of github.com:sequelpro/sequelpro
Diffstat (limited to 'Source/SPDatabaseDocument.m')
-rw-r--r--Source/SPDatabaseDocument.m15
1 files changed, 12 insertions, 3 deletions
diff --git a/Source/SPDatabaseDocument.m b/Source/SPDatabaseDocument.m
index 08b2737d..bc1acb22 100644
--- a/Source/SPDatabaseDocument.m
+++ b/Source/SPDatabaseDocument.m
@@ -427,7 +427,10 @@ static int64_t SPDatabaseDocumentInstanceCounter = 0;
#ifndef SP_CODA
// Set the fileURL and init the preferences (query favs, filters, and history) if available for that URL
- [self setFileURL:[[SPQueryController sharedQueryController] registerDocumentWithFileURL:[self fileURL] andContextInfo:spfPreferences]];
+ NSURL *newURL = [[SPQueryController sharedQueryController] registerDocumentWithFileURL:[self fileURL] andContextInfo:spfPreferences];
+#warning debug code for #2266
+ if(!newURL) NSLog(@"#2266: Trying to set nil fileURL in %s from queryController=%@ oldFileURL=%@ contextInfo=%@", __func__, [SPQueryController sharedQueryController], [self fileURL], spfPreferences);
+ [self setFileURL:newURL];
// ...but hide the icon while the document is temporary
if ([self isUntitled]) [[parentWindow standardWindowButton:NSWindowDocumentIconButton] setImage:nil];
@@ -3534,7 +3537,10 @@ static int64_t SPDatabaseDocumentInstanceCounter = 0;
[preferences setObject:[spfStructure objectForKey:SPContentFilters] forKey:SPContentFilters];
[[SPQueryController sharedQueryController] registerDocumentWithFileURL:[NSURL fileURLWithPath:fileName] andContextInfo:preferences];
- [self setFileURL:[NSURL fileURLWithPath:fileName]];
+ NSURL *newURL = [NSURL fileURLWithPath:fileName];
+#warning debug code for #2266
+ if(!newURL) NSLog(@"#2266: Trying to set nil fileURL in %s from fileName=%@", __func__, fileName);
+ [self setFileURL:newURL];
[[NSDocumentController sharedDocumentController] noteNewRecentDocumentURL:[NSURL fileURLWithPath:fileName]];
[self updateWindowTitle:self];
@@ -5088,7 +5094,10 @@ static int64_t SPDatabaseDocumentInstanceCounter = 0;
}
if (![self isSaveInBundle]) {
- [self setFileURL:[NSURL fileURLWithPath:path]];
+ NSURL *newURL = [NSURL fileURLWithPath:path];
+#warning debug code for #2266
+ if(!newURL) NSLog(@"#2266: Trying to set nil fileURL in %s from path=%@", __func__, path);
+ [self setFileURL:newURL];
}
[spfDocData setObject:[NSNumber numberWithBool:([[data objectForKey:@"connection"] objectForKey:@"password"]) ? YES : NO] forKey:@"save_password"];