Skip to content

Commit 8b6dc62

Browse files
committed
Fix two cases of background thread updating UI (could cause a concurrent modification exception)
1 parent 98e4a6f commit 8b6dc62

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Source/SPDataImport.m

+2-2
Original file line numberDiff line numberDiff line change
@@ -1092,7 +1092,7 @@ - (void)importCSVFile:(NSString *)filename
10921092
[query release];
10931093

10941094
if ([mySQLConnection queryErrored]) {
1095-
[tableDocumentInstance showConsole:nil];
1095+
[[tableDocumentInstance onMainThread] showConsole:nil];
10961096
[errors appendFormat:
10971097
NSLocalizedString(@"[ERROR in row %ld] %@\n", @"error text when reading of csv file gave errors"),
10981098
(long)(rowsImported+1),[mySQLConnection lastErrorMessage]];
@@ -1132,7 +1132,7 @@ - (void)importCSVFile:(NSString *)filename
11321132

11331133
// If an error occurred, run the queries individually to get exact line errors
11341134
if (!importMethodIsUpdate && [mySQLConnection queryErrored]) {
1135-
[tableDocumentInstance showConsole:nil];
1135+
[[tableDocumentInstance onMainThread] showConsole:nil];
11361136
for (i = 0; i < csvRowsThisQuery; i++) {
11371137
if (progressCancelled) break;
11381138
query = [[NSMutableString alloc] initWithString:insertBaseString];

0 commit comments

Comments
 (0)