diff --git a/indra/llrender/llrender.cpp b/indra/llrender/llrender.cpp
index 03a9884c2bcacde9122b842ea388ba549e8101c5..cd827f5091eb4b1cc1c27379c6a36f35378cf6af 100644
--- a/indra/llrender/llrender.cpp
+++ b/indra/llrender/llrender.cpp
@@ -1434,8 +1434,6 @@ void LLRender::loadIdentity()
 	flush();
 
 	{
-		llassert_always(mMatrixMode < NUM_MATRIX_MODES) ;
-
 		mMatrix[mMatrixMode][mMatIdx[mMatrixMode]].make_identity();
 		mMatHash[mMatrixMode]++;
 	}
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 8449e74fb6e0d96ee53f6482a314ec83b6859e73..737c5b51a2f3ba421863598acb9a6baaf2df89ec 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -3765,6 +3765,7 @@ void LLPipeline::renderGeom(LLCamera& camera, BOOL forceVBOUpdate)
 	LLAppViewer::instance()->pingMainloopTimeout("Pipeline:ForceVBO");
 	
 	// Initialize lots of GL state to "safe" values
+	gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
 	gGL.matrixMode(LLRender::MM_TEXTURE);
 	gGL.loadIdentity();
 	gGL.matrixMode(LLRender::MM_MODELVIEW);