Skip to content

Commit a8132af

Browse files
committed
add synchronized block to map operation
1 parent 792844e commit a8132af

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Parse/Internal/LocalDataStore/OfflineStore/PFOfflineStore.m

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1004,7 +1004,9 @@ - (void)updateObjectIdForObject:(PFObject *)object
10041004
if ([object isKindOfClass:[PFInstallation class]]
10051005
&& newObjectId == nil) {
10061006
NSString *key = [self _generateKeyForClassName:object.parseClassName objectId:oldObjectId];
1007-
[self.classNameAndObjectIdToObjectMap removeObjectForKey:key];
1007+
@synchronized(self.lock) {
1008+
[self.classNameAndObjectIdToObjectMap removeObjectForKey:key];
1009+
}
10081010
return;
10091011
}
10101012
#endif

0 commit comments

Comments
 (0)