Skip to content

Commit

Permalink
Ensure copiedClient is not nil before setting _metadata
Browse files Browse the repository at this point in the history
- Delete some unused files
  • Loading branch information
intelliot committed Nov 16, 2015
1 parent 8fa1482 commit ecff079
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 247 deletions.
10 changes: 6 additions & 4 deletions BraintreeCore/BTAPIClient.m
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,12 @@ - (instancetype)copyWithSource:(BTClientMetadataSourceType)source
// IMPORTANT: Copy http so that tests using FakeHTTP will work.
copiedClient.http = self.http;

BTMutableClientMetadata *mutableMetadata = [self.metadata mutableCopy];
mutableMetadata.source = source;
mutableMetadata.integration = integration;
copiedClient->_metadata = [mutableMetadata copy];
if (copiedClient) {
BTMutableClientMetadata *mutableMetadata = [self.metadata mutableCopy];
mutableMetadata.source = source;
mutableMetadata.integration = integration;
copiedClient->_metadata = [mutableMetadata copy];
}

return copiedClient;
}
Expand Down

This file was deleted.

This file was deleted.

115 changes: 0 additions & 115 deletions Specs/Braintree-Acceptance-Specs/BTCoinbaseAcceptanceSpec.m

This file was deleted.

This file was deleted.

This file was deleted.

0 comments on commit ecff079

Please sign in to comment.