summaryrefslogtreecommitdiff
path: root/indra/newview/llappviewer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llappviewer.cpp')
-rw-r--r--indra/newview/llappviewer.cpp19
1 files changed, 13 insertions, 6 deletions
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 8b3f3aa28e..bdfe0d9142 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -703,9 +703,9 @@ bool LLAppViewer::init()
settings_map["account"] = &gSavedPerAccountSettings;
LLUI::initClass(settings_map,
- LLUIImageList::getInstance(),
- ui_audio_callback,
- &LLUI::sGLScaleFactor);
+ LLUIImageList::getInstance(),
+ ui_audio_callback,
+ &LLUI::sGLScaleFactor);
// Setup paths and LLTrans after LLUI::initClass has been called
LLUI::setupPaths();
@@ -1516,7 +1516,7 @@ bool LLAppViewer::cleanup()
LLAvatarIconIDCache::getInstance()->save();
llinfos << "Shutting down Threads" << llendflush;
-
+
// Let threads finish
LLTimer idleTimer;
idleTimer.reset();
@@ -1530,19 +1530,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;