From aeb5ec548006a76e926a2bd982b362e13251841b Mon Sep 17 00:00:00 2001 From: Bibiko Date: Wed, 13 Jan 2010 19:21:17 +0000 Subject: =?UTF-8?q?=E2=80=A2=20avoid=20querying=20for=20collations=20if=20?= =?UTF-8?q?passed=20var=20"encoding"=20for=20method=20getDatabaseCollation?= =?UTF-8?q?sForEncoding=20is=20equal=20to=20NULL?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Source/SPDatabaseData.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Source') diff --git a/Source/SPDatabaseData.m b/Source/SPDatabaseData.m index b27863b9..c3649328 100644 --- a/Source/SPDatabaseData.m +++ b/Source/SPDatabaseData.m @@ -259,7 +259,7 @@ const CHAR_SETS charsets[] = */ - (NSArray *)getDatabaseCollationsForEncoding:(NSString *)encoding { - if ((characterSetEncoding == nil) || (![characterSetEncoding isEqualToString:encoding]) || ([characterSetCollations count] == 0)) { + if (encoding && ((characterSetEncoding == nil) || (![characterSetEncoding isEqualToString:encoding]) || ([characterSetCollations count] == 0))) { [characterSetEncoding release]; [characterSetCollations removeAllObjects]; -- cgit v1.2.3