diff options
author | Dave Parks <davep@lindenlab.com> | 2012-10-15 15:59:41 -0500 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2012-10-15 15:59:41 -0500 |
commit | c97730988eccf10ce8a93e3f564d2b248b17abc8 (patch) | |
tree | d7b3be08681fe4390ffd6153578c61289a70bcbe /indra/newview | |
parent | 5ad21254deb581be413bc57c11cd2a0f698cf2b8 (diff) |
MAINT-1721 Fix for crash when clicking "back" button after editing appearance.
Reviewed by VoidPointer
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/lltexlayer.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/indra/newview/lltexlayer.cpp b/indra/newview/lltexlayer.cpp index 467115c928..ad09af6594 100644 --- a/indra/newview/lltexlayer.cpp +++ b/indra/newview/lltexlayer.cpp @@ -510,7 +510,13 @@ void LLTexLayerSetBuffer::doUpload() BOOL valid = FALSE; LLPointer<LLImageJ2C> integrity_test = new LLImageJ2C; S32 file_size = 0; - U8* data = LLVFile::readFile(gVFS, asset_id, LLAssetType::AT_TEXTURE, &file_size); + + //data buffer MUST be allocated using LLImageBase + LLVFile file(gVFS, asset_id, LLAssetType::AT_TEXTURE); + file_size = file.getSize(); + U8* data = integrity_test->allocateData(file_size); + file.read(data, file_size); + if (data) { valid = integrity_test->validate(data, file_size); // integrity_test will delete 'data' |