Added guard around adding a NULL object to an array

This commit is contained in:
Kevin Harwood 2013-04-06 15:02:57 -05:00
parent 5b633898b3
commit c8e420990e

View file

@ -224,6 +224,7 @@ static inline BOOL AFStateTransitionIsValid(AFOperationState fromState, AFOperat
SecKeyRef allowedPublicKey = SecTrustCopyPublicKey(allowedTrust);
NSCParameterAssert(allowedPublicKey);
if(allowedPublicKey!=NULL)
[publicKeys addObject:(__bridge_transfer id)allowedPublicKey];
CFRelease(allowedTrust);