diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp
index d7911aa53bd576d056db785744c05225be91674d..531efbc5f152b924fe25f29a94d4ccfeb2461d6f 100644
--- a/indra/newview/llviewerdisplay.cpp
+++ b/indra/newview/llviewerdisplay.cpp
@@ -939,7 +939,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
 				gPipeline.mScreen.bindTarget();
 				if (LLPipeline::sUnderWaterRender && !gPipeline.canUseWindLightShaders())
 				{
-					const LLColor4 &col = LLEnvironment::instance().getCurrentWater()->getWaterFogColor();
+					const LLColor3 col = LLEnvironment::instance().getCurrentWater()->getWaterFogColor();
 					glClearColor(col.mV[0], col.mV[1], col.mV[2], 0.f);
 				}
 				gPipeline.mScreen.clear();