summaryrefslogtreecommitdiff
path: root/indra/newview/llviewertexture.cpp
diff options
context:
space:
mode:
authorAndrey Lihatskiy <alihatskiy@productengine.com>2026-02-06 20:41:32 +0200
committerAndrey Lihatskiy <118752495+marchcat@users.noreply.github.com>2026-02-07 15:03:15 +0200
commit30f0b8cad2d9164b0087550c42c2449f18eafa7c (patch)
treebf6e908c4135a278d9a813f2495dc3949311def2 /indra/newview/llviewertexture.cpp
parentee3242a56372e1b930840f1067fbe59cdb56e447 (diff)
#5380 Fix race condition in texture creation causing AV
Move addToCreateTexture() after image scaling to prevent mRawImage from being replaced while background thread holds pointer to it.
Diffstat (limited to 'indra/newview/llviewertexture.cpp')
-rw-r--r--indra/newview/llviewertexture.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp
index 23915d01fa..50dcc7a975 100644
--- a/indra/newview/llviewertexture.cpp
+++ b/indra/newview/llviewertexture.cpp
@@ -1898,13 +1898,11 @@ bool LLViewerFetchedTexture::processFetchResults(S32& desired_discard, S32 curre
mRawDiscardLevel = INVALID_DISCARD_LEVEL;
mIsFetching = false;
mLastPacketTimer.reset();
- }
- else
- {
- mIsRawImageValid = true;
- addToCreateTexture();
+ return false;
}
+ mIsRawImageValid = true;
+
if (mBoostLevel == LLGLTexture::BOOST_ICON)
{
S32 expected_width = mKnownDrawWidth > 0 ? mKnownDrawWidth : DEFAULT_ICON_DIMENSIONS;
@@ -1935,6 +1933,8 @@ bool LLViewerFetchedTexture::processFetchResults(S32& desired_discard, S32 curre
}
}
+ addToCreateTexture();
+
return true;
}
else