diff options
Diffstat (limited to 'indra/newview')
| -rw-r--r-- | indra/newview/llpanelface.cpp | 4 | ||||
| -rw-r--r-- | indra/newview/lltexturecache.cpp | 23 |
2 files changed, 15 insertions, 12 deletions
diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp index f95a83f427..7e75dca908 100644 --- a/indra/newview/llpanelface.cpp +++ b/indra/newview/llpanelface.cpp @@ -2377,8 +2377,8 @@ void LLPanelFace::onCommitPlanarAlign(LLUICtrl* ctrl, void* userdata) void LLPanelFace::onTextureSelectionChanged(LLInventoryItem* itemp) { LL_DEBUGS("Materials") << "item asset " << itemp->getAssetUUID() << LL_ENDL; - LLRadioGroup* radio_mat_type = getChild<LLRadioGroup>("radio_material_type"); - if(radio_mat_type) + LLRadioGroup* radio_mat_type = findChild<LLRadioGroup>("radio_material_type"); + if(!radio_mat_type) { return; } diff --git a/indra/newview/lltexturecache.cpp b/indra/newview/lltexturecache.cpp index 1000377718..71d3731f93 100644 --- a/indra/newview/lltexturecache.cpp +++ b/indra/newview/lltexturecache.cpp @@ -1879,24 +1879,27 @@ S32 LLTextureCache::getHeaderCacheEntry(const LLUUID& id, Entry& entry) S32 LLTextureCache::setHeaderCacheEntry(const LLUUID& id, Entry& entry, S32 imagesize, S32 datasize) { mHeaderMutex.lock(); - S32 idx = openAndReadEntry(id, entry, true); + S32 idx = openAndReadEntry(id, entry, true); // read or create mHeaderMutex.unlock(); - if (idx >= 0) - { - updateEntry(idx, entry, imagesize, datasize); - } - - if(idx < 0) // retry + if(idx < 0) // retry once { readHeaderCache(); // We couldn't write an entry, so refresh the LRU - + mHeaderMutex.lock(); - llassert_always(!mLRU.empty() || mHeaderEntriesInfo.mEntries < sCacheMaxEntries); + idx = openAndReadEntry(id, entry, true); mHeaderMutex.unlock(); + } - idx = setHeaderCacheEntry(id, entry, imagesize, datasize); // assert above ensures no inf. recursion + if (idx >= 0) + { + updateEntry(idx, entry, imagesize, datasize); } + else + { + LL_WARNS() << "Failed to set cache entry for image: " << id << LL_ENDL; + } + return idx; } |
