aboutsummaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorMax <post@wickenrode.com>2016-03-05 04:41:52 +0100
committerMax <post@wickenrode.com>2016-03-05 04:41:52 +0100
commit2301018aeddd58ff0b2c90e2ae0dc88d213192c2 (patch)
tree206f5feb5ba7f189144220de5acd78acab2d345f /Source
parent737add47a8a3875b2a855597cb63f915fb0ba93b (diff)
downloadsequelpro-2301018aeddd58ff0b2c90e2ae0dc88d213192c2.tar.gz
sequelpro-2301018aeddd58ff0b2c90e2ae0dc88d213192c2.tar.bz2
sequelpro-2301018aeddd58ff0b2c90e2ae0dc88d213192c2.zip
Fix a wrongly structured setter that might have been involved in some crashes
Diffstat (limited to 'Source')
-rw-r--r--Source/SPDatabaseDocument.m5
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/SPDatabaseDocument.m b/Source/SPDatabaseDocument.m
index 0d766bff..21f774e5 100644
--- a/Source/SPDatabaseDocument.m
+++ b/Source/SPDatabaseDocument.m
@@ -4447,8 +4447,9 @@ static int64_t SPDatabaseDocumentInstanceCounter = 0;
*/
- (void)setFileURL:(NSURL *)theURL
{
- if (spfFileURL) SPClear(spfFileURL);
- spfFileURL = [theURL retain];
+ [theURL retain];
+ [spfFileURL release];
+ spfFileURL = theURL;
if ([parentWindowController selectedTableDocument] == self) {
if (spfFileURL && [spfFileURL isFileURL])
[parentWindow setRepresentedURL:spfFileURL];