File tree Expand file tree Collapse file tree 2 files changed +4
-6
lines changed
Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -1429,6 +1429,7 @@ - (void) endTask
14291429
14301430 // Decrement the working level
14311431 _isWorkingLevel--;
1432+ assert(_isWorkingLevel >= 0);
14321433
14331434 // Ensure cancellation interface is reset
14341435 [self disableTaskCancellation];
Original file line number Diff line number Diff line change @@ -314,17 +314,14 @@ - (void)loadTable:(NSString *)aTable
314314
315315 // If no table has been supplied, clear the table interface and return
316316 if (!aTable || [aTable isEqualToString: @" " ]) {
317- [self performSelectorOnMainThread: @selector (setTableDetails: ) withObject: nil waitUntilDone: YES ];
318-
317+ [[self onMainThread ] setTableDetails: nil ];
319318 return ;
320319 }
321320
322321 // Attempt to retrieve the table encoding; if that fails (indicating an error occurred
323322 // while retrieving table data), or if the Rows variable is null, clear and return
324323 if (![tableDataInstance tableEncoding ] || [[[tableDataInstance statusValues ] objectForKey: @" Rows" ] isNSNull ]) {
325- [self performSelectorOnMainThread: @selector (setTableDetails: ) withObject: nil waitUntilDone: YES ];
326- [tableDocumentInstance performSelectorOnMainThread: @selector (endTask ) withObject: nil waitUntilDone: YES ];
327-
324+ [[self onMainThread ] setTableDetails: nil ];
328325 return ;
329326 }
330327
@@ -338,7 +335,7 @@ - (void)loadTable:(NSString *)aTable
338335 [tableDataInstance columnNames ], @" columnNames" ,
339336 [tableDataInstance getConstraints ], @" constraints" ,
340337 nil ];
341- [self performSelectorOnMainThread: @selector ( setTableDetails: ) withObject: tableDetails waitUntilDone: YES ];
338+ [[ self onMainThread ] setTableDetails: tableDetails];
342339
343340 // Init copyTable with necessary information for copying selected rows as SQL INSERT
344341 [tableContentView setTableInstance: self withTableData: tableValues withColumns: dataColumns withTableName: selectedTable withConnection: mySQLConnection];
You can’t perform that action at this time.
0 commit comments