diff options
author | Oz Linden <oz@lindenlab.com> | 2012-10-16 09:36:15 -0400 |
---|---|---|
committer | Oz Linden <oz@lindenlab.com> | 2012-10-16 09:36:15 -0400 |
commit | e7a5dc7cda09e65f8592793990c494a978a21271 (patch) | |
tree | a2cf565398704eb7d75842cc4158b904d3eb06e6 /indra/newview | |
parent | 474ea25a5e918f0926706c43f45299383539976c (diff) | |
parent | a7f6dcaef7fb49901a2ebf0629e3089fa8cdad98 (diff) |
pull back changes from 3.4.1-beta8
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' |