From 5c7ef8c800c61acb00bd36bd81f457bb813b4902 Mon Sep 17 00:00:00 2001 From: "alecf%netscape.com" Date: Fri, 21 Mar 2003 08:38:56 +0000 Subject: [PATCH] oops, don't free the arena pool if we never allocated it! duh. fixes a shutdown crash --- xpcom/ds/nsAtomTable.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/xpcom/ds/nsAtomTable.cpp b/xpcom/ds/nsAtomTable.cpp index 55761cb7a5d..91cd6433340 100644 --- a/xpcom/ds/nsAtomTable.cpp +++ b/xpcom/ds/nsAtomTable.cpp @@ -277,10 +277,12 @@ void NS_PurgeAtomTable() #endif PL_DHashTableFinish(&gAtomTable); gAtomTable.entryCount = 0; - - PL_FinishArenaPool(gStaticAtomArena); - delete gStaticAtomArena; - gStaticAtomArena = nsnull; + + if (gStaticAtomArena) { + PL_FinishArenaPool(gStaticAtomArena); + delete gStaticAtomArena; + gStaticAtomArena = nsnull; + } } }