summaryrefslogtreecommitdiff
path: root/indra/llimage/llimagepng.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llimage/llimagepng.cpp')
-rw-r--r--indra/llimage/llimagepng.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/indra/llimage/llimagepng.cpp b/indra/llimage/llimagepng.cpp
index 4d081ce169..d75084cf08 100644
--- a/indra/llimage/llimagepng.cpp
+++ b/indra/llimage/llimagepng.cpp
@@ -54,6 +54,8 @@ bool LLImagePNG::updateData()
try
{
+ LLImageDataLock lock(this);
+
// Check to make sure that this instance has been initialized with data
if (!getData() || (0 == getDataSize()))
{
@@ -103,6 +105,9 @@ bool LLImagePNG::decode(LLImageRaw* raw_image, F32 decode_time)
resetLastError();
+ LLImageDataSharedLock lockIn(this);
+ LLImageDataLock lockOut(raw_image);
+
// Check to make sure that this instance has been initialized with data
if (!getData() || (0 == getDataSize()))
{
@@ -135,6 +140,9 @@ bool LLImagePNG::encode(const LLImageRaw* raw_image, F32 encode_time)
resetLastError();
+ LLImageDataSharedLock lockIn(raw_image);
+ LLImageDataLock lockOut(this);
+
// Image logical size
setSize(raw_image->getWidth(), raw_image->getHeight(), raw_image->getComponents());