From ce554304fbc21e8a52b236a56eea70287f002fdd Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Wed, 18 May 2011 11:46:55 -0600 Subject: fix for SH-1591: crash at LLVOCacheEntry::~LLVOCacheEntry() line 138 --- indra/newview/llvocache.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'indra/newview/llvocache.cpp') diff --git a/indra/newview/llvocache.cpp b/indra/newview/llvocache.cpp index b888a263d0..c605ddb1c8 100644 --- a/indra/newview/llvocache.cpp +++ b/indra/newview/llvocache.cpp @@ -76,6 +76,7 @@ LLVOCacheEntry::LLVOCacheEntry(LLAPRFile* apr_file) S32 size = -1; BOOL success; + mDP.assignBuffer(mBuffer, 0); success = check_read(apr_file, &mLocalID, sizeof(U32)); if(success) { @@ -136,10 +137,11 @@ LLVOCacheEntry::LLVOCacheEntry(LLAPRFile* apr_file) LLVOCacheEntry::~LLVOCacheEntry() { - if(mBuffer) + if(mBuffer != mDP.getBuffer()) { - delete[] mBuffer; + delete[] mBuffer ; //just in case } + mDP.freeBuffer(); } -- cgit v1.2.3