summaryrefslogtreecommitdiff
path: root/indra/newview/llvovolume.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llvovolume.cpp')
-rw-r--r--indra/newview/llvovolume.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index 5521b7f5f7..58f94120d0 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -746,13 +746,16 @@ void LLVOVolume::sculpt()
return;
LLPointer<LLImageRaw> raw_image = new LLImageRaw();
- mSculptTexture->readBackRaw(discard_level, raw_image, TRUE);
+ mSculptTexture->readBackRaw(discard_level, raw_image, FALSE);
sculpt_height = raw_image->getHeight();
sculpt_width = raw_image->getWidth();
sculpt_components = raw_image->getComponents();
sculpt_data = raw_image->getData();
+
+ llassert_always(raw_image->getDataSize() >= sculpt_height * sculpt_width * sculpt_components);
+
getVolume()->sculpt(sculpt_width, sculpt_height, sculpt_components, sculpt_data, discard_level);
}
}