fix for MAINT-1113: [PUBLIC_JIRA_USERS][crashhunters] crash at LLViewerTextureList::removeImageFromList(LLViewerFetchedTexture *) [secondlife-bin llviewertexturelist.cpp]
parent
1faf3d9c5f
commit
f25dbddd5b
|
|
@ -1842,8 +1842,6 @@ F32 LLViewerFetchedTexture::maxDecodePriority()
|
|||
|
||||
void LLViewerFetchedTexture::setDecodePriority(F32 priority)
|
||||
{
|
||||
llassert(!mInImageList);
|
||||
|
||||
mDecodePriority = priority;
|
||||
|
||||
if(mDecodePriority < F_ALMOST_ZERO)
|
||||
|
|
|
|||
|
|
@ -503,6 +503,7 @@ LLViewerFetchedTexture *LLViewerTextureList::findImage(const LLUUID &image_id)
|
|||
|
||||
void LLViewerTextureList::addImageToList(LLViewerFetchedTexture *image)
|
||||
{
|
||||
assert_main_thread();
|
||||
llassert_always(mInitialized) ;
|
||||
llassert(image);
|
||||
if (image->isInImageList())
|
||||
|
|
@ -519,6 +520,7 @@ void LLViewerTextureList::addImageToList(LLViewerFetchedTexture *image)
|
|||
|
||||
void LLViewerTextureList::removeImageFromList(LLViewerFetchedTexture *image)
|
||||
{
|
||||
assert_main_thread();
|
||||
llassert_always(mInitialized) ;
|
||||
llassert(image);
|
||||
if (!image->isInImageList())
|
||||
|
|
@ -763,7 +765,12 @@ void LLViewerTextureList::updateImagesDecodePriorities()
|
|||
imagep->setInactive() ;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (!imagep->isInImageList())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
imagep->processTextureStats();
|
||||
F32 old_priority = imagep->getDecodePriority();
|
||||
F32 old_priority_test = llmax(old_priority, 0.0f);
|
||||
|
|
@ -773,9 +780,9 @@ void LLViewerTextureList::updateImagesDecodePriorities()
|
|||
if ((decode_priority_test < old_priority_test * .8f) ||
|
||||
(decode_priority_test > old_priority_test * 1.25f))
|
||||
{
|
||||
removeImageFromList(imagep);
|
||||
mImageList.erase(imagep) ;
|
||||
imagep->setDecodePriority(decode_priority);
|
||||
addImageToList(imagep);
|
||||
mImageList.insert(imagep);
|
||||
}
|
||||
update_counter--;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue