diff options
author | Kelly Washington <kelly@lindenlab.com> | 2012-10-25 16:13:39 -0700 |
---|---|---|
committer | Kelly Washington <kelly@lindenlab.com> | 2012-10-25 16:13:39 -0700 |
commit | 0cdff2817bdc342e0ac8b3c8711e3f7a72f1f617 (patch) | |
tree | 0fbaca9292450f05588336eb6639b12d182156e1 /indra/newview/lltexlayer.cpp | |
parent | 03fa24f8aecc071bac920a400c122cbce0b029b4 (diff) | |
parent | 1743e6a81330824021667000f8acdd6cf64dbf1b (diff) |
Merge
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' |