diff --git a/xpcom/threads/nsThread.cpp b/xpcom/threads/nsThread.cpp index 436fa063b1de..f5146d704f2a 100644 --- a/xpcom/threads/nsThread.cpp +++ b/xpcom/threads/nsThread.cpp @@ -82,6 +82,12 @@ nsThread::~nsThread() PR_LOG(nsIThreadLog, PR_LOG_DEBUG, ("nsIThread %p destroyed\n", this)); +#if defined(PR_LOGGING) + if (this == gMainThread) { + delete nsIThreadLog; + nsIThreadLog = nsnull; + } +#endif } void