summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorsimon@Simon-PC.lindenlab.com <simon@Simon-PC.lindenlab.com>2012-10-17 12:36:11 -0700
committersimon@Simon-PC.lindenlab.com <simon@Simon-PC.lindenlab.com>2012-10-17 12:36:11 -0700
commit4d807ba638cea8898beed5ca8e7e1951adb962bb (patch)
treef997e76de0e514cf11974848684e4b3f9e424172 /indra/newview
parent161c848e3d78a1ec6265b33b3d9f999dd11126f9 (diff)
parent8c8c2f3b940059f82777c9b0b9f40e4d2f7bc6ab (diff)
Merge in upstream fixes
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'