diff options
author | Gilbert Gonzales <gilbert@lindenlab.com> | 2012-10-17 15:28:40 -0700 |
---|---|---|
committer | Gilbert Gonzales <gilbert@lindenlab.com> | 2012-10-17 15:28:40 -0700 |
commit | 3dc61c4b4afed47826070aa906e58c8c5ca3efa0 (patch) | |
tree | 078d2f9d44e5d6f0fc0f47cee388377eb8c0e0ed /indra/newview/lltexlayer.cpp | |
parent | 05a72687d848c13754039f6e720a137827533fdb (diff) | |
parent | c320b4878ae9cd166594285a88437f0d5c333353 (diff) |
merging in latest changes
Diffstat (limited to 'indra/newview/lltexlayer.cpp')
-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' |