Skip to content

Commit 1cc1872

Browse files
committed
#2393 BugSplat Crash #1504586: LLRenderTarget::getTexture(483)
1 parent 28331b2 commit 1cc1872

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

indra/llrender/llrendertarget.cpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -475,12 +475,10 @@ void LLRenderTarget::clear(U32 mask_in)
475475

476476
U32 LLRenderTarget::getTexture(U32 attachment) const
477477
{
478-
if (attachment > mTex.size()-1)
479-
{
480-
LL_ERRS() << "Invalid attachment index." << LL_ENDL;
481-
}
482-
if (mTex.empty())
478+
if (attachment >= mTex.size())
483479
{
480+
LL_WARNS() << "Invalid attachment index " << attachment << " for size " << mTex.size() << LL_ENDL;
481+
llassert(false);
484482
return 0;
485483
}
486484
return mTex[attachment];

0 commit comments

Comments
 (0)