diff --git a/xpfe/components/history/src/nsGlobalHistory.cpp b/xpfe/components/history/src/nsGlobalHistory.cpp index 7f6a30856026..6718d8fb9ad2 100644 --- a/xpfe/components/history/src/nsGlobalHistory.cpp +++ b/xpfe/components/history/src/nsGlobalHistory.cpp @@ -2397,12 +2397,12 @@ nsGlobalHistory::CreateTokens() nsresult nsGlobalHistory::Commit(eCommitType commitType) { + if (!mStore || !mTable) + return NS_OK; + nsresult err = NS_OK; nsMdbPtr 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; }