diff --git a/Parse/Parse/PFObject.m b/Parse/Parse/PFObject.m index c15bfc9cf..b6b737a2c 100644 --- a/Parse/Parse/PFObject.m +++ b/Parse/Parse/PFObject.m @@ -1326,6 +1326,10 @@ - (void)removeOldKeysAfterFetch:(NSDictionary *)result { - (void)_mergeAfterSaveWithResult:(NSDictionary *)result decoder:(PFDecoder *)decoder { @synchronized (lock) { + if (operationSetQueue.count == 0) + { // it should never be empty at this point. if it is, add a dummy: + [operationSetQueue addObject:[[PFOperationSet alloc] init]]; + } PFOperationSet *operationsBeforeSave = operationSetQueue[0]; [operationSetQueue removeObjectAtIndex:0];