Index: net/ssl/client_cert_store_win.cc |
diff --git a/net/ssl/client_cert_store_win.cc b/net/ssl/client_cert_store_win.cc |
index 499d1c4b55ecb8cca0ff0a90a3130b5e78a5ec43..cf962312dd96ea3be7aca5aee2bb39237a2a7afe 100644 |
--- a/net/ssl/client_cert_store_win.cc |
+++ b/net/ssl/client_cert_store_win.cc |
@@ -149,7 +149,8 @@ void GetClientCertsImpl(HCERTSTORE cert_store, |
// pair<X509Certificate, SSLPrivateKeyCallback>. |
scoped_refptr<X509Certificate> cert = X509Certificate::CreateFromHandle( |
cert_context2, intermediates); |
- selected_certs->push_back(cert); |
+ if (cert) |
+ selected_certs->push_back(cert); |
CertFreeCertificateContext(cert_context2); |
for (size_t i = 0; i < intermediates.size(); ++i) |
CertFreeCertificateContext(intermediates[i]); |