diff --git a/indra/llrender/lluiimage.inl b/indra/llrender/lluiimage.inl
index 3b23d77d62b1ab62de83133e43c5d923eda9f59c..f5227556f0b95c61da04f83b6a327e401e6bb3e0 100644
--- a/indra/llrender/lluiimage.inl
+++ b/indra/llrender/lluiimage.inl
@@ -64,14 +64,14 @@ void LLUIImage::drawBorder(S32 x, S32 y, S32 width, S32 height, const LLColor4&
 }
 
 // returns dimensions of underlying textures, which might not be equal to ui image portion
-S32 LLUIImage::getTextureWidth() const
-{
-    mCachedW = (mCachedW == -1) ? getWidth() : mCachedW;
-    return mCachedW;
-}
-
-S32 LLUIImage::getTextureHeight() const
-{
-    mCachedH = (mCachedH == -1) ? getHeight() : mCachedH;
-    return mCachedH;
-}
+S32 LLUIImage::getTextureWidth() const
+{
+    mCachedW = (mCachedW == -1) ? getWidth() : mCachedW;
+    return mCachedW;
+}
+
+S32 LLUIImage::getTextureHeight() const
+{
+    mCachedH = (mCachedH == -1) ? getHeight() : mCachedH;
+    return mCachedH;
+}