summaryrefslogtreecommitdiff
path: root/indra/newview/llappviewer.cpp
diff options
context:
space:
mode:
authorXiaohong Bao <bao@lindenlab.com>2010-03-04 15:02:30 -0700
committerXiaohong Bao <bao@lindenlab.com>2010-03-04 15:02:30 -0700
commitb0d4919fd453fea9afc1cc0745140e83992997b6 (patch)
tree4a249ec99652a6041a9599b6415a44539e4c0f50 /indra/newview/llappviewer.cpp
parent60fde8d512cfe7456ad5756c22f8bd9284c0c14e (diff)
fix for EXT-5683: viewer crashes at llcommon/llworkerthread.cpp(323): ERROR: LLWorkerClass::checkWork: ASSERT(workreq).
Diffstat (limited to 'indra/newview/llappviewer.cpp')
-rw-r--r--indra/newview/llappviewer.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 948d38befb..d7b605fb08 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -1515,7 +1515,7 @@ bool LLAppViewer::cleanup()
LLAvatarIconIDCache::getInstance()->save();
llinfos << "Shutting down Threads" << llendflush;
-
+
// Let threads finish
LLTimer idleTimer;
idleTimer.reset();
@@ -1529,19 +1529,26 @@ bool LLAppViewer::cleanup()
pending += LLVFSThread::updateClass(0);
pending += LLLFSThread::updateClass(0);
F64 idle_time = idleTimer.getElapsedTimeF64();
- if (!pending || idle_time >= max_idle_time)
+ if(!pending)
+ {
+ break ; //done
+ }
+ else if(idle_time >= max_idle_time)
{
llwarns << "Quitting with pending background tasks." << llendl;
break;
}
}
-
+
// Delete workers first
// shotdown all worker threads before deleting them in case of co-dependencies
sTextureCache->shutdown();
sTextureFetch->shutdown();
sImageDecodeThread->shutdown();
+ sTextureFetch->shutDownTextureCacheThread() ;
+ sTextureFetch->shutDownImageDecodeThread() ;
+
delete sTextureCache;
sTextureCache = NULL;
delete sTextureFetch;