diff options
| author | Dave Parks <davep@lindenlab.com> | 2022-06-07 15:12:58 -0500 |
|---|---|---|
| committer | Dave Parks <davep@lindenlab.com> | 2022-06-07 15:12:58 -0500 |
| commit | 197baebc62d1e4b922730266f77f4e6b555e2cac (patch) | |
| tree | 617d62fdb87a4baaff2cbeb83407466f6e19eb22 /indra/newview/llviewertexturelist.cpp | |
| parent | 5259fa811c11892ef150f853c9de5a8927fa68a6 (diff) | |
SL-17547 Fix for crash in getCurrentDiscardLevelForFetching (and add runtime check and assertion to avoid crash in production and detect crash in development).
Diffstat (limited to 'indra/newview/llviewertexturelist.cpp')
| -rw-r--r-- | indra/newview/llviewertexturelist.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index ac036bce31..8faeb70553 100644 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -1025,7 +1025,7 @@ F32 LLViewerTextureList::updateImagesFetchTextures(F32 max_time) LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE; LLTimer image_op_timer; - typedef std::vector<LLViewerFetchedTexture*> entries_list_t; + typedef std::vector<LLPointer<LLViewerFetchedTexture> > entries_list_t; entries_list_t entries; // update N textures at beginning of mImageList @@ -1057,10 +1057,13 @@ F32 LLViewerTextureList::updateImagesFetchTextures(F32 max_time) } } - for (auto* imagep : entries) + for (auto& imagep : entries) { - updateImageDecodePriority(imagep); - imagep->updateFetch(); + if (imagep->getNumRefs() > 1) // make sure this image hasn't been deleted before attempting to update (may happen as a side effect of some other image updating) + { + updateImageDecodePriority(imagep); + imagep->updateFetch(); + } } if (entries.size() > 0) |
