diff options
author | pavelkproductengine <pavelkproductengine@lindenlab.com> | 2017-05-31 19:28:46 +0300 |
---|---|---|
committer | pavelkproductengine <pavelkproductengine@lindenlab.com> | 2017-05-31 19:28:46 +0300 |
commit | 5205be0c65bf8dee8b51c112083a4cc8a7cebc49 (patch) | |
tree | d0592cb64251b1686b748f9c0a1dd5f638d48783 /indra/llimage/llimagepng.cpp | |
parent | 5e905cf80d472c433875452a2baaa179ceb0fe71 (diff) |
STORM-2148 Crash on trying to save texture file(s) to computer from inventory
Diffstat (limited to 'indra/llimage/llimagepng.cpp')
-rw-r--r-- | indra/llimage/llimagepng.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/indra/llimage/llimagepng.cpp b/indra/llimage/llimagepng.cpp index a299602d79..a4823ed859 100644 --- a/indra/llimage/llimagepng.cpp +++ b/indra/llimage/llimagepng.cpp @@ -124,12 +124,12 @@ bool LLImagePNG::encode(const LLImageRaw* raw_image, F32 encode_time) // Temporary buffer to hold the encoded image. Note: the final image // size should be much smaller due to compression. - U32 bufferSize = getWidth() * getHeight() * getComponents() + 1024; + U32 bufferSize = getWidth() * getHeight() * getComponents() + 8192; U8* tmpWriteBuffer = new U8[ bufferSize ]; // Delegate actual encoding work to wrapper LLPngWrapper pngWrapper; - if (! pngWrapper.writePng(raw_image, tmpWriteBuffer)) + if (!pngWrapper.writePng(raw_image, tmpWriteBuffer, bufferSize)) { setLastError(pngWrapper.getErrorMessage()); delete[] tmpWriteBuffer; |