crypt32: Don't dereference an output pointer which may be NULL.
diff --git a/dlls/crypt32/store.c b/dlls/crypt32/store.c
index 3a786b0..9d670f9 100644
--- a/dlls/crypt32/store.c
+++ b/dlls/crypt32/store.c
@@ -899,7 +899,8 @@
if (existing)
{
CertContext_CopyProperties(existing, pCertContext);
- *ppStoreContext = CertDuplicateCertificateContext(existing);
+ if (ppStoreContext)
+ *ppStoreContext = CertDuplicateCertificateContext(existing);
}
else
toAdd = CertDuplicateCertificateContext(pCertContext);