diff options
Diffstat (limited to 'Source/SPDatabaseDocument.m')
-rw-r--r-- | Source/SPDatabaseDocument.m | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Source/SPDatabaseDocument.m b/Source/SPDatabaseDocument.m index c211376d..308826e0 100644 --- a/Source/SPDatabaseDocument.m +++ b/Source/SPDatabaseDocument.m @@ -438,6 +438,10 @@ static NSString *SPCreateSyntx = @"SPCreateSyntax"; if ([encodingType intValue] != SPEncodingAutodetect) { [self setConnectionEncoding:[self mysqlEncodingFromEncodingTag:encodingType] reloadingViews:NO]; + } else { +#endif + [[self onMainThread] updateEncodingMenuWithSelectedEncoding:[self encodingTagFromMySQLEncoding:[mySQLConnection encoding]]]; +#ifndef SP_REFACTOR } #endif @@ -531,7 +535,7 @@ static NSString *SPCreateSyntx = @"SPCreateSyntax"; } } - (void)[self databaseEncoding]; + if ([self database]) (void)[self databaseEncoding]; #endif #ifdef SP_REFACTOR /* glue */ if ( delegate && [delegate respondsToSelector:@selector(databaseDocumentDidConnect:)] ) |