From 75138ddfb27416b8740df35fcc0eb6ed3643452f Mon Sep 17 00:00:00 2001 From: James Cook Date: Fri, 20 Nov 2009 10:46:58 -0800 Subject: Fix main loop to llerrs on memory alloc failure, was masked by misuse of LLFLoaterReg with LLFloaterMemLeak. Reviewed with Bao --- indra/newview/llappviewer.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'indra') 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("mem_leaking"); + LLFloaterMemLeak* mem_leak_instance = + LLFloaterReg::findTypedInstance("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("mem_leaking"); + LLFloaterMemLeak* mem_leak_instance = + LLFloaterReg::findTypedInstance("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("mem_leaking"); + LLFloaterMemLeak* mem_leak_instance = + LLFloaterReg::findTypedInstance("mem_leaking"); if(mem_leak_instance) { mem_leak_instance->stop() ; -- cgit v1.2.3