Bug 827272 - Avoid performing cleanup on SSL state that doesn't exist. r=bsmith

This commit is contained in:
Josh Matthews 2013-01-14 16:53:30 +01:00
parent 77eebe60e5
commit 90bc762d37

View File

@ -187,13 +187,17 @@ SharedSSLState::GlobalCleanup()
{
MOZ_ASSERT(NS_IsMainThread(), "Not on main thread");
gPrivateState->Cleanup();
delete gPrivateState;
gPrivateState = nullptr;
if (gPrivateState) {
gPrivateState->Cleanup();
delete gPrivateState;
gPrivateState = nullptr;
}
gPublicState->Cleanup();
delete gPublicState;
gPublicState = nullptr;
if (gPublicState) {
gPublicState->Cleanup();
delete gPublicState;
gPublicState = nullptr;
}
}
/*static*/ void