Avoid possible crash on opensim.

See http://redmine.kokuaviewer.org/issues/582

This happened only on opensim. The fixed was made
basically by MichelleZ. It doesn't harm anything, so
even though it appears to never happen on Agni
and it is unknown what bug is causing it, it make the
viewer resilient just-in-case...
This commit is contained in:
Aleric Inglewood
2011-05-14 19:38:03 +02:00
parent dc9465a521
commit 1bc876542c

View File

@@ -2681,7 +2681,12 @@ void LLViewerFetchedTexture::setCachedRawImage()
{
--i ;
}
if (mRawImage->getComponents() == 5)
{
llwarns << "IMP-582: Trying to scale an image (" << mID << ") with 5 components!" << llendl;
mIsRawImageValid = 0;
return;
}
mRawImage->scale(w >> i, h >> i) ;
}
if(mCachedRawImage.notNull())