summaryrefslogtreecommitdiff
path: root/indra/newview/llviewertexlayer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llviewertexlayer.cpp')
-rwxr-xr-xindra/newview/llviewertexlayer.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/indra/newview/llviewertexlayer.cpp b/indra/newview/llviewertexlayer.cpp
index cd5e781d71..f3c9921819 100755
--- a/indra/newview/llviewertexlayer.cpp
+++ b/indra/newview/llviewertexlayer.cpp
@@ -416,7 +416,10 @@ void LLViewerTexLayerSetBuffer::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);
+ 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'