From d4f3fe3c5691348b72729ba57cef337c1dca0141 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Tue, 10 Dec 2013 12:50:23 -0800 Subject: SH-4653 FIX Interesting: Viewer crashes while reading chat history --- indra/llcommon/llthread.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'indra/llcommon/llthread.cpp') diff --git a/indra/llcommon/llthread.cpp b/indra/llcommon/llthread.cpp index cf105098ef..368a059182 100755 --- a/indra/llcommon/llthread.cpp +++ b/indra/llcommon/llthread.cpp @@ -132,7 +132,7 @@ void *APR_THREAD_FUNC LLThread::staticRun(apr_thread_t *apr_threadp, void *datap #endif // for now, hard code all LLThreads to report to single master thread recorder, which is known to be running on main thread - LLTrace::ThreadRecorder thread_recorder(*LLTrace::get_master_thread_recorder()); + mRecorder = new LLTrace::ThreadRecorder(*LLTrace::get_master_thread_recorder()); #if !LL_DARWIN sThreadID = threadp->mID; @@ -222,6 +222,8 @@ void LLThread::shutdown() // This thread just wouldn't stop, even though we gave it time //LL_WARNS() << "LLThread::~LLThread() exiting thread before clean exit!" << LL_ENDL; // Put a stake in its heart. + delete mRecorder; + apr_thread_exit(mAPRThreadp, -1); return; } @@ -239,6 +241,8 @@ void LLThread::shutdown() apr_pool_destroy(mAPRPoolp); mAPRPoolp = 0; } + + delete mRecorder; } -- cgit v1.2.3