aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llvovolume.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--linden/indra/newview/llvovolume.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/linden/indra/newview/llvovolume.cpp b/linden/indra/newview/llvovolume.cpp
index 4b357e2..188c277 100644
--- a/linden/indra/newview/llvovolume.cpp
+++ b/linden/indra/newview/llvovolume.cpp
@@ -762,7 +762,7 @@ void LLVOVolume::sculpt()
762 return; 762 return;
763 763
764 LLPointer<LLImageRaw> raw_image = new LLImageRaw(); 764 LLPointer<LLImageRaw> raw_image = new LLImageRaw();
765 mSculptTexture->readBackRaw(discard_level, raw_image, FALSE); 765 BOOL is_valid = mSculptTexture->readBackRaw(discard_level, raw_image, FALSE);
766 766
767 sculpt_height = raw_image->getHeight(); 767 sculpt_height = raw_image->getHeight();
768 sculpt_width = raw_image->getWidth(); 768 sculpt_width = raw_image->getWidth();
@@ -770,6 +770,16 @@ void LLVOVolume::sculpt()
770 sculpt_components = raw_image->getComponents(); 770 sculpt_components = raw_image->getComponents();
771 sculpt_data = raw_image->getData(); 771 sculpt_data = raw_image->getData();
772 772
773 if(is_valid)
774 {
775 is_valid = mSculptTexture->isValidForSculpt(discard_level, sculpt_width, sculpt_height, sculpt_components) ;
776 }
777 if(!is_valid)
778 {
779 sculpt_width = 0 ;
780 sculpt_height = 0 ;
781 }
782
773 llassert_always(raw_image->getDataSize() >= sculpt_height * sculpt_width * sculpt_components); 783 llassert_always(raw_image->getDataSize() >= sculpt_height * sculpt_width * sculpt_components);
774 784
775 getVolume()->sculpt(sculpt_width, sculpt_height, sculpt_components, sculpt_data, discard_level); 785 getVolume()->sculpt(sculpt_width, sculpt_height, sculpt_components, sculpt_data, discard_level);