diff options
author | rowanbeentje <rowan@beent.je> | 2012-06-11 14:22:32 +0000 |
---|---|---|
committer | rowanbeentje <rowan@beent.je> | 2012-06-11 14:22:32 +0000 |
commit | 343dc13be9aadb459444b648916e859ec5b18b9b (patch) | |
tree | c4e1f1a075dde85175af11d70b3bb247efa8d2fd /Source | |
parent | 2919f39e402aa7219958454ca0da452af3e163e9 (diff) | |
download | sequelpro-343dc13be9aadb459444b648916e859ec5b18b9b.tar.gz sequelpro-343dc13be9aadb459444b648916e859ec5b18b9b.tar.bz2 sequelpro-343dc13be9aadb459444b648916e859ec5b18b9b.zip |
- Retain the new SPDatabaseData defaultCharacterSetEncoding when created, fixing overrelease crashing on exit
Diffstat (limited to 'Source')
-rw-r--r-- | Source/SPDatabaseData.m | 2 | ||||
-rw-r--r-- | Source/SPDatabaseDocument.m | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/Source/SPDatabaseData.m b/Source/SPDatabaseData.m index a49248d1..4c99b97e 100644 --- a/Source/SPDatabaseData.m +++ b/Source/SPDatabaseData.m @@ -299,7 +299,7 @@ NSInteger _sortStorageEngineEntry(NSDictionary *itemOne, NSDictionary *itemTwo, [result setReturnDataAsStrings:YES]; - defaultCharacterSetEncoding = [[result getRowAsDictionary] objectForKey:@"Value"]; + defaultCharacterSetEncoding = [[[result getRowAsDictionary] objectForKey:@"Value"] retain]; } return defaultCharacterSetEncoding; diff --git a/Source/SPDatabaseDocument.m b/Source/SPDatabaseDocument.m index 4f4deaca..7c7d2a39 100644 --- a/Source/SPDatabaseDocument.m +++ b/Source/SPDatabaseDocument.m @@ -1591,7 +1591,7 @@ static NSString *SPRenameDatabaseAction = @"SPRenameDatabase"; NSString *mysqlEncoding = [databaseDataInstance getDatabaseDefaultCharacterSet]; - [selectedDatabaseEncoding release]; + [selectedDatabaseEncoding release], selectedDatabaseEncoding = nil; // Fallback or older version? -> set encoding to mysql default encoding latin1 if (!mysqlEncoding) { |