diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index cf716953b8de45889eb638c57327adcc5bb80be3..2ddb0fc1276f4b61dc3951441b987cd849127ab7 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -3903,10 +3903,10 @@ void LLPipeline::postSort(LLCamera& camera)
 				}
 			} func;
 
-			if (!mSelectedFaces.empty())
-			{
-				LLPipeline::setRenderHighlightTextureChannel(gFloaterTools->getPanelFace()->getTextureChannelToEdit());
-			}
+			if (!mSelectedFaces.empty())
+			{
+				LLPipeline::setRenderHighlightTextureChannel(gFloaterTools->getPanelFace()->getTextureChannelToEdit());
+			}
 			LLSelectMgr::getInstance()->getSelection()->applyToTEs(&func);
 		}
 	}
@@ -10688,7 +10688,6 @@ void LLPipeline::generateImpostor(LLVOAvatar* avatar)
 		markVisible(avatar->mDrawable, *viewer_camera);
 		LLVOAvatar::sUseImpostors = false; // @TODO ???
 
-		LLVOAvatar::attachment_map_t::iterator iter;
 		for (const auto& attach_pair : avatar->mAttachmentPoints)
 		{
 			for (LLViewerObject* attached_object : attach_pair.second->mAttachedObjects)