diff --git a/indra/newview/llmaterialmgr.cpp b/indra/newview/llmaterialmgr.cpp
index c93f17859ca3739bb8954ae099df9481eb79ed30..6068c2606c7641e2e7239a174a861a111e9dda2b 100644
--- a/indra/newview/llmaterialmgr.cpp
+++ b/indra/newview/llmaterialmgr.cpp
@@ -473,6 +473,11 @@ void LLMaterialMgr::processGetQueue()
 
 		material_queue_t& materials = itRegionQueue->second;
 		material_queue_t::iterator loopMaterial = materials.begin();
+		if (materials.end() == loopMaterial)
+		{
+			//LL_INFOS("Material") << "Get queue for region empty, trying next region." << LL_ENDL;
+			continue;
+		}
 		while ( (materials.end() != loopMaterial) && (materialsData.size() <= MATERIALS_GET_MAX_ENTRIES) )
 		{
 			material_queue_t::iterator itMaterial = loopMaterial++;