diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp
index f0800e82e7d66ab243f03fc95c457d5319d38912..3482ac508ed9940035f47734e1e0317d78477bb4 100644
--- a/indra/newview/llviewerdisplay.cpp
+++ b/indra/newview/llviewerdisplay.cpp
@@ -731,6 +731,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
 		{
 			LLViewerCamera::sCurCameraID = LLViewerCamera::CAMERA_WORLD;
 			LLMemType mt_ss(LLMemType::MTYPE_DISPLAY_STATE_SORT);
+			gPipeline.sAllowRebuildPriorityGroup = TRUE ;
 			gPipeline.stateSort(*LLViewerCamera::getInstance(), result);
 			stop_glerror();
 				
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index 594435475f4e02d75171d583cd488dffa8317659..d6453111d7a47d5fed0ca95c331447a5c5781855 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -1856,6 +1856,11 @@ void LLVOVolume::syncMediaData(S32 texture_index, const LLSD &media_data, bool m
 	}
 	
 	LLTextureEntry *te = getTE(texture_index);
+	if(!te)
+	{
+		return ;
+	}
+
 	LL_DEBUGS("MediaOnAPrim") << "BEFORE: texture_index = " << texture_index
 		<< " hasMedia = " << te->hasMedia() << " : " 
 		<< ((NULL == te->getMediaData()) ? "NULL MEDIA DATA" : ll_pretty_print_sd(te->getMediaData()->asLLSD())) << llendl;
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 2d2fc385738189a1ff7f1683704e825b300c6411..cc65b34a612e3eb6d4b7ed1312634457b54e2f7c 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -284,6 +284,7 @@ BOOL	LLPipeline::sRenderFrameTest = FALSE;
 BOOL	LLPipeline::sRenderAttachedLights = TRUE;
 BOOL	LLPipeline::sRenderAttachedParticles = TRUE;
 BOOL	LLPipeline::sRenderDeferred = FALSE;
+BOOL    LLPipeline::sAllowRebuildPriorityGroup = FALSE ;
 S32		LLPipeline::sVisibleLightCount = 0;
 F32		LLPipeline::sMinRenderSize = 0.f;
 
@@ -1780,6 +1781,12 @@ void LLPipeline::updateGL()
 
 void LLPipeline::rebuildPriorityGroups()
 {
+	if(!sAllowRebuildPriorityGroup)
+	{
+		return ;
+	}
+	sAllowRebuildPriorityGroup = FALSE ;
+
 	LLTimer update_timer;
 	LLMemType mt(LLMemType::MTYPE_PIPELINE);
 	
diff --git a/indra/newview/pipeline.h b/indra/newview/pipeline.h
index 60e0b0ae8c07bf53960c18dffae8faf72eba0096..89649a0682440914e07b5d3f8cfd7bad1fd9d129 100644
--- a/indra/newview/pipeline.h
+++ b/indra/newview/pipeline.h
@@ -462,6 +462,7 @@ class LLPipeline
 	static BOOL				sRenderAttachedLights;
 	static BOOL				sRenderAttachedParticles;
 	static BOOL				sRenderDeferred;
+	static BOOL             sAllowRebuildPriorityGroup;
 	static S32				sVisibleLightCount;
 	static F32				sMinRenderSize;