mirror of
https://github.com/zhigang1992/RestKit.git
synced 2026-04-21 02:50:11 +08:00
Fix null dereference static analyzer warnings
This commit is contained in:
@@ -99,7 +99,7 @@
|
||||
[mapperOperation start];
|
||||
[mapperOperation waitUntilFinished];
|
||||
if (mapperOperation.error) {
|
||||
*error = mapperOperation.error;
|
||||
if (error) *error = mapperOperation.error;
|
||||
return nil;
|
||||
}
|
||||
|
||||
|
||||
@@ -169,7 +169,10 @@ static NSIndexSet *RKObjectRequestOperationAcceptableMIMETypes()
|
||||
mapperOperation.targetObject = self.targetObject;
|
||||
[mapperOperation start];
|
||||
[mapperOperation waitUntilFinished];
|
||||
if (mapperOperation.error) *error = mapperOperation.error;
|
||||
if (mapperOperation.error) {
|
||||
if (error) *error = mapperOperation.error;
|
||||
return nil;
|
||||
}
|
||||
return mapperOperation.mappingResult;
|
||||
}
|
||||
|
||||
|
||||
@@ -225,7 +225,7 @@ NSError *RKErrorFromMappingResult(RKMappingResult *mappingResult)
|
||||
RKMapperOperation *mapper = [[RKMapperOperation alloc] initWithObject:sourceObject mappingsDictionary:self.responseMappingsDictionary];
|
||||
mapper.mappingOperationDataSource = dataSource;
|
||||
[mapper start];
|
||||
*error = mapper.error;
|
||||
if (error) *error = mapper.error;
|
||||
return mapper.mappingResult;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user