Skip to content
This repository was archived by the owner on Jan 16, 2021. It is now read-only.

Commit 7db4afc

Browse files
committed
Merge pull request #210 from ParsePlatform/nlutsenko.mainThread
Fix potential crash when calling UI code from background thread.
2 parents 956fcbf + 5ad6bf4 commit 7db4afc

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

ParseUI/Classes/QueryTableViewController/PFQueryTableViewController.m

+3-2
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121

2222
#import "PFQueryTableViewController.h"
2323

24+
#import <Bolts/BFExecutor.h>
2425
#import <Bolts/BFTask.h>
2526
#import <Bolts/BFTaskCompletionSource.h>
2627

@@ -397,8 +398,8 @@ - (void)removeObjectsAtIndexPaths:(NSArray *)indexPaths animated:(BOOL)animated
397398
[allDeletionTasks addObject:[obj deleteInBackground]];
398399
}
399400

400-
[[BFTask taskForCompletionOfAllTasks:allDeletionTasks]
401-
continueWithBlock:deletionHandlerBlock];
401+
[[BFTask taskForCompletionOfAllTasks:allDeletionTasks] continueWithExecutor:[BFExecutor mainThreadExecutor]
402+
withBlock:deletionHandlerBlock];
402403
}
403404

404405
- (PFTableViewCell *)tableView:(UITableView *)otherTableView cellForNextPageAtIndexPath:(NSIndexPath *)indexPath {

0 commit comments

Comments
 (0)