diff options
author | James Cook <james@lindenlab.com> | 2009-11-20 10:46:58 -0800 |
---|---|---|
committer | James Cook <james@lindenlab.com> | 2009-11-20 10:46:58 -0800 |
commit | 75138ddfb27416b8740df35fcc0eb6ed3643452f (patch) | |
tree | 5badcb88975f9cdee27455e7c17356db9e25708f | |
parent | ba3f7965e35e4eb0d7fcecc7267ec3af5f2d8d87 (diff) |
Fix main loop to llerrs on memory alloc failure, was masked by misuse of LLFLoaterReg with LLFloaterMemLeak.
Reviewed with Bao
-rw-r--r-- | indra/newview/llappviewer.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index a5ca06ce30..4f2d3e9645 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -985,7 +985,8 @@ bool LLAppViewer::mainLoop() #endif //memory leaking simulation - LLFloaterMemLeak* mem_leak_instance = LLFloaterReg::getTypedInstance<LLFloaterMemLeak>("mem_leaking"); + LLFloaterMemLeak* mem_leak_instance = + LLFloaterReg::findTypedInstance<LLFloaterMemLeak>("mem_leaking"); if(mem_leak_instance) { mem_leak_instance->idle() ; @@ -1171,7 +1172,8 @@ bool LLAppViewer::mainLoop() catch(std::bad_alloc) { //stop memory leaking simulation - LLFloaterMemLeak* mem_leak_instance = LLFloaterReg::getTypedInstance<LLFloaterMemLeak>("mem_leaking"); + LLFloaterMemLeak* mem_leak_instance = + LLFloaterReg::findTypedInstance<LLFloaterMemLeak>("mem_leaking"); if(mem_leak_instance) { mem_leak_instance->stop() ; @@ -1199,7 +1201,8 @@ bool LLAppViewer::mainLoop() llwarns << "Bad memory allocation when saveFinalSnapshot() is called!" << llendl ; //stop memory leaking simulation - LLFloaterMemLeak* mem_leak_instance = LLFloaterReg::getTypedInstance<LLFloaterMemLeak>("mem_leaking"); + LLFloaterMemLeak* mem_leak_instance = + LLFloaterReg::findTypedInstance<LLFloaterMemLeak>("mem_leaking"); if(mem_leak_instance) { mem_leak_instance->stop() ; |