diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index b2a15a0f2f..6d2a26ec01 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -2497,6 +2497,9 @@ void LLPipeline::updateCull(LLCamera& camera, LLCullResult& result, S32 water_cl LL_RECORD_BLOCK_TIME(FTM_CULL); + // Factor out instance() call + LLWorld& world = LLWorld::instance(); + grabReferences(result); sCull->clear(); @@ -2556,8 +2559,8 @@ void LLPipeline::updateCull(LLCamera& camera, LLCullResult& result, S32 water_cl camera.disableUserClipPlane(); } - for (LLWorld::region_list_t::const_iterator iter = LLWorld::getInstance()->getRegionList().begin(); - iter != LLWorld::getInstance()->getRegionList().end(); ++iter) + for (LLWorld::region_list_t::const_iterator iter = world.getRegionList().begin(); // Factor out instance() call + iter != world.getRegionList().end(); ++iter) { LLViewerRegion* region = *iter; @@ -2622,7 +2625,7 @@ void LLPipeline::updateCull(LLCamera& camera, LLCullResult& result, S32 water_cl if (render_water) { - LLWorld::getInstance()->precullWaterObjects(camera, sCull, render_water); + world.precullWaterObjects(camera, sCull, render_water); // Factor out instance() call } gGL.matrixMode(LLRender::MM_PROJECTION);