diff options
author | Xiaohong Bao <bao@lindenlab.com> | 2010-03-29 11:28:42 -0600 |
---|---|---|
committer | Xiaohong Bao <bao@lindenlab.com> | 2010-03-29 11:28:42 -0600 |
commit | 970b7051acbc23a504c40f23fb6180e45aa536ae (patch) | |
tree | ada5fbfed3bd30294799545e9ca689718d3f9712 /indra/newview | |
parent | fad31dc087cb670bd4479195cac2c31da9a55e57 (diff) |
fix for EXT-6566: crash at LLTextureCache::updatedHeaderEntriesFile [secondlife-bin lltexturecache.cpp:1292]
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/lltexturecache.cpp | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/indra/newview/lltexturecache.cpp b/indra/newview/lltexturecache.cpp index 7a0712f8aa..0e72b93e48 100644 --- a/indra/newview/lltexturecache.cpp +++ b/indra/newview/lltexturecache.cpp @@ -1221,9 +1221,17 @@ U32 LLTextureCache::openAndReadEntries(std::vector<Entry>& entries) mFreeList.clear(); mTexturesSizeTotal = 0; - LLAPRFile* aprfile = openHeaderEntriesFile(true, 0); - updatedHeaderEntriesFile() ; - aprfile->seek(APR_SET, (S32)sizeof(EntriesInfo)); + LLAPRFile* aprfile = NULL; + if(mUpdatedEntryMap.empty()) + { + aprfile = openHeaderEntriesFile(true, (S32)sizeof(EntriesInfo)); + } + else //update the header file first. + { + aprfile = openHeaderEntriesFile(false, 0); + updatedHeaderEntriesFile() ; + aprfile->seek(APR_SET, (S32)sizeof(EntriesInfo)); + } for (U32 idx=0; idx<num_entries; idx++) { Entry entry; |