diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp
index 1bf655debbe88249e9127923ec28f5850622eca8..92d8eed1a303b7597008dc61ed20d40ba6f75332 100755
--- a/indra/newview/llpanelface.cpp
+++ b/indra/newview/llpanelface.cpp
@@ -1176,7 +1176,7 @@ void LLPanelFace::updateUI()
 			bool identical_norm_repeats = false;
 			bool identical_spec_repeats = false;
 
-			LLSelectedTE::getMaxDiffuseRepeats(repeats_spec, identical_spec_repeats);
+			LLSelectedTE::getMaxDiffuseRepeats(repeats_diff, identical_diff_repeats);
 			LLSelectedTEMaterial::getMaxNormalRepeats(repeats_norm, identical_norm_repeats);
 			LLSelectedTEMaterial::getMaxSpecularRepeats(repeats_spec, identical_spec_repeats);