summaryrefslogtreecommitdiff
path: root/indra/newview/llvocache.cpp
diff options
context:
space:
mode:
authorPaul ProductEngine <pguslisty@productengine.com>2011-09-07 16:15:54 +0300
committerPaul ProductEngine <pguslisty@productengine.com>2011-09-07 16:15:54 +0300
commitbb085a45db845a9bfe8aae83ecc7938f618e9ddc (patch)
treec899b00ec7fec2d91f9443de4a93eb21b4a38170 /indra/newview/llvocache.cpp
parentaaee960dd3a2d3da51db6b8ba7a6f5b1f414aef5 (diff)
parentd63b72fb538d4a9dc977eae91d99263355fadef3 (diff)
Merge from seth_mesh_dev to paul_mesh_dev
Diffstat (limited to 'indra/newview/llvocache.cpp')
-rw-r--r--indra/newview/llvocache.cpp18
1 files changed, 11 insertions, 7 deletions
diff --git a/indra/newview/llvocache.cpp b/indra/newview/llvocache.cpp
index f0b5b50feb..6d457434b5 100644
--- a/indra/newview/llvocache.cpp
+++ b/indra/newview/llvocache.cpp
@@ -621,16 +621,20 @@ void LLVOCache::readFromCache(U64 handle, const LLUUID& id, LLVOCacheEntry::voca
S32 num_entries;
success = check_read(&apr_file, &num_entries, sizeof(S32)) ;
- for (S32 i = 0; success && i < num_entries; i++)
+ if(success)
{
- LLVOCacheEntry* entry = new LLVOCacheEntry(&apr_file);
- if (!entry->getLocalID())
+ for (S32 i = 0; i < num_entries; i++)
{
- llwarns << "Aborting cache file load for " << filename << ", cache file corruption!" << llendl;
- delete entry ;
- success = false ;
+ LLVOCacheEntry* entry = new LLVOCacheEntry(&apr_file);
+ if (!entry->getLocalID())
+ {
+ llwarns << "Aborting cache file load for " << filename << ", cache file corruption!" << llendl;
+ delete entry ;
+ success = false ;
+ break ;
+ }
+ cache_entry_map[entry->getLocalID()] = entry;
}
- cache_entry_map[entry->getLocalID()] = entry;
}
}
}