From 8b6dc62de2cd4a3d6f61bece6dcd259610422adb Mon Sep 17 00:00:00 2001 From: Max Date: Thu, 16 Mar 2017 01:09:44 +0100 Subject: Fix two cases of background thread updating UI (could cause a concurrent modification exception) --- Source/SPDataImport.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Source') diff --git a/Source/SPDataImport.m b/Source/SPDataImport.m index 1f619070..03b83c6c 100644 --- a/Source/SPDataImport.m +++ b/Source/SPDataImport.m @@ -1092,7 +1092,7 @@ [query release]; if ([mySQLConnection queryErrored]) { - [tableDocumentInstance showConsole:nil]; + [[tableDocumentInstance onMainThread] showConsole:nil]; [errors appendFormat: NSLocalizedString(@"[ERROR in row %ld] %@\n", @"error text when reading of csv file gave errors"), (long)(rowsImported+1),[mySQLConnection lastErrorMessage]]; @@ -1132,7 +1132,7 @@ // If an error occurred, run the queries individually to get exact line errors if (!importMethodIsUpdate && [mySQLConnection queryErrored]) { - [tableDocumentInstance showConsole:nil]; + [[tableDocumentInstance onMainThread] showConsole:nil]; for (i = 0; i < csvRowsThisQuery; i++) { if (progressCancelled) break; query = [[NSMutableString alloc] initWithString:insertBaseString]; -- cgit v1.2.3