diff options
| author | Andrey Lihatskiy <alihatskiy@productengine.com> | 2026-03-03 18:10:42 +0200 |
|---|---|---|
| committer | Andrey Lihatskiy <118752495+marchcat@users.noreply.github.com> | 2026-03-03 18:45:05 +0200 |
| commit | 88c4cf7da060fdd20d562519f0c067942cd5d61d (patch) | |
| tree | 118bb23e545ee7324b8f99d93ae3e5d402c43102 | |
| parent | c94a118af80367c3f73cfe93559185c8f2cf3750 (diff) | |
#5426 Fix crash in LLPointer<LLImageGL>::notNull
| -rw-r--r-- | indra/newview/llviewertexturelist.cpp | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index 96962bbeae..bfa662e5ef 100644 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -1096,7 +1096,17 @@ F32 LLViewerTextureList::updateImagesCreateTextures(F32 max_time) while (!mCreateTextureList.empty()) { - LLViewerFetchedTexture* imagep = mCreateTextureList.front(); + // Hold a smart pointer to keep the texture alive throughout processing, + // even if side effects (e.g. pipeline rebuilds, GL operations) indirectly + // cause other references to be released. (see: #5426) + LLPointer<LLViewerFetchedTexture> imagep = mCreateTextureList.front(); + mCreateTextureList.pop(); + + if (!imagep) + { + continue; + } + llassert(imagep->mCreatePending); // desired discard may change while an image is being decoded. If the texture in VRAM is sufficient @@ -1122,8 +1132,6 @@ F32 LLViewerTextureList::updateImagesCreateTextures(F32 max_time) imagep->scaleDown(); } - mCreateTextureList.pop(); - if (create_timer.getElapsedTimeF32() > max_time) { break; |
