crypt32: Don't crash on freeing null chain engine.

This commit is contained in:
Juan Lang 2006-09-20 11:49:48 -07:00 committed by Alexandre Julliard
parent c33f0c555e
commit 0624ba1b2e
1 changed files with 1 additions and 1 deletions

View File

@ -163,7 +163,7 @@ void WINAPI CertFreeCertificateChainEngine(HCERTCHAINENGINE hChainEngine)
TRACE("(%p)\n", hChainEngine);
if (InterlockedDecrement(&engine->ref) == 0)
if (engine && InterlockedDecrement(&engine->ref) == 0)
{
CertCloseStore(engine->hWorld, 0);
CertCloseStore(engine->hRoot, 0);