summaryrefslogtreecommitdiff
path: root/indra/newview/lltexlayer.cpp
diff options
context:
space:
mode:
authorMerov Linden <merov@lindenlab.com>2012-10-17 19:33:09 -0700
committerMerov Linden <merov@lindenlab.com>2012-10-17 19:33:09 -0700
commitec9260701feaa9ae1453c57f0f70449bb9b60af2 (patch)
tree9a6e74ee503c956dc8f13851f3ff0da712861b08 /indra/newview/lltexlayer.cpp
parente56145176875a09dc9e1524a47bcc1259582c896 (diff)
parent49ad7fd4b57cec635c557070be02556094e90ff6 (diff)
Pull merge from richard/viewer-chui
Diffstat (limited to 'indra/newview/lltexlayer.cpp')
-rw-r--r--indra/newview/lltexlayer.cpp8
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'