From 5ad6bf46dc89eb39f1dba290f470886fab146956 Mon Sep 17 00:00:00 2001 From: Nikita Lutsenko Date: Mon, 30 Nov 2015 12:33:30 -0800 Subject: [PATCH] Fix potential crash when calling UI code from background thread. --- .../QueryTableViewController/PFQueryTableViewController.m | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ParseUI/Classes/QueryTableViewController/PFQueryTableViewController.m b/ParseUI/Classes/QueryTableViewController/PFQueryTableViewController.m index ee17366..bfb5d83 100644 --- a/ParseUI/Classes/QueryTableViewController/PFQueryTableViewController.m +++ b/ParseUI/Classes/QueryTableViewController/PFQueryTableViewController.m @@ -21,6 +21,7 @@ #import "PFQueryTableViewController.h" +#import #import #import @@ -397,8 +398,8 @@ - (void)removeObjectsAtIndexPaths:(NSArray *)indexPaths animated:(BOOL)animated [allDeletionTasks addObject:[obj deleteInBackground]]; } - [[BFTask taskForCompletionOfAllTasks:allDeletionTasks] - continueWithBlock:deletionHandlerBlock]; + [[BFTask taskForCompletionOfAllTasks:allDeletionTasks] continueWithExecutor:[BFExecutor mainThreadExecutor] + withBlock:deletionHandlerBlock]; } - (PFTableViewCell *)tableView:(UITableView *)otherTableView cellForNextPageAtIndexPath:(NSIndexPath *)indexPath {