From 1cc1872c76de0d5f5d6c04c4b510367f9f002d97 Mon Sep 17 00:00:00 2001 From: Alexander Gavriliuk Date: Thu, 22 Aug 2024 15:59:15 +0200 Subject: #2393 BugSplat Crash #1504586: LLRenderTarget::getTexture(483) --- indra/llrender/llrendertarget.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/indra/llrender/llrendertarget.cpp b/indra/llrender/llrendertarget.cpp index f700201ace..21a0820d32 100644 --- a/indra/llrender/llrendertarget.cpp +++ b/indra/llrender/llrendertarget.cpp @@ -475,12 +475,10 @@ void LLRenderTarget::clear(U32 mask_in) U32 LLRenderTarget::getTexture(U32 attachment) const { - if (attachment > mTex.size()-1) - { - LL_ERRS() << "Invalid attachment index." << LL_ENDL; - } - if (mTex.empty()) + if (attachment >= mTex.size()) { + LL_WARNS() << "Invalid attachment index " << attachment << " for size " << mTex.size() << LL_ENDL; + llassert(false); return 0; } return mTex[attachment]; -- cgit v1.2.3