fix assert-on-exit as well as a crash when switching profiles

sr=darin, r=dmose
This commit is contained in:
alecf%netscape.com 2001-03-28 23:59:44 +00:00
parent f54ac9de78
commit b04c1c9d1c

View File

@ -2397,12 +2397,12 @@ nsGlobalHistory::CreateTokens()
nsresult nsGlobalHistory::Commit(eCommitType commitType)
{
if (!mStore || !mTable)
return NS_OK;
nsresult err = NS_OK;
nsMdbPtr<nsIMdbThumb> thumb(mEnv);
if (!mStore || !mTable)
return NS_ERROR_NOT_INITIALIZED;
if (commitType == kLargeCommit || commitType == kSessionCommit)
{
mdb_percent outActualWaste = 0;
@ -2507,6 +2507,8 @@ nsGlobalHistory::CloseDB()
if (mEnv)
mEnv->CloseMdbObject(mEnv /* XXX */);
mTable = mEnv = mStore = nsnull;
return NS_OK;
}