summaryrefslogtreecommitdiff
path: root/indra/newview/lltexturecache.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/lltexturecache.cpp')
-rw-r--r--indra/newview/lltexturecache.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/indra/newview/lltexturecache.cpp b/indra/newview/lltexturecache.cpp
index dce7d8da40..aa081ff7bb 100644
--- a/indra/newview/lltexturecache.cpp
+++ b/indra/newview/lltexturecache.cpp
@@ -1266,9 +1266,17 @@ U32 LLTextureCache::openAndReadEntries(std::vector<Entry>& entries)
mFreeList.clear();
mTexturesSizeTotal = 0;
- LLAPRFile* aprfile = openHeaderEntriesFile(true, 0);
+ 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;