diff options
author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2011-08-29 10:36:48 -0400 |
---|---|---|
committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2011-08-29 10:36:48 -0400 |
commit | f054d44f9e2e0d152b1a0167b007eb10105487d6 (patch) | |
tree | 3cf567add6e532f212192a6c94bfaf17c7eecc76 /indra/newview/llvocache.cpp | |
parent | 2e4dcca9e2049aa4a8c29820937b6a956d75e5d8 (diff) | |
parent | d45995b80d6d90aad6714adf3237dc44589169ea (diff) |
merg
Diffstat (limited to 'indra/newview/llvocache.cpp')
-rw-r--r-- | indra/newview/llvocache.cpp | 18 |
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; } } } |