summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorsimon@Simon-PC.lindenlab.com <simon@Simon-PC.lindenlab.com>2012-10-16 09:58:31 -0700
committersimon@Simon-PC.lindenlab.com <simon@Simon-PC.lindenlab.com>2012-10-16 09:58:31 -0700
commit7f0d6e0377dc0996a606c3f9575e8ffdad6441e0 (patch)
tree1437bd9c9441f0c7e5e60e005912666bcf8407fd /indra/newview
parentd6e3b0445a49d0fb10ca9e6cb668c65984ce1866 (diff)
parente7a5dc7cda09e65f8592793990c494a978a21271 (diff)
Pull back viewer-development with latest beta merges
Diffstat (limited to 'indra/newview')
-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'