diff options
author | Jacek Antonelli | 2008-08-15 23:45:44 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-08-15 23:45:44 -0500 |
commit | acfdcf2b1deeb04698174c78e8cb22b093445bb1 (patch) | |
tree | 811293650bcf81d01ea7c54d7c2cf263110aa329 /linden/indra/newview/llvovolume.cpp | |
parent | Second Life viewer sources 1.20.2 (diff) | |
download | meta-impy-acfdcf2b1deeb04698174c78e8cb22b093445bb1.zip meta-impy-acfdcf2b1deeb04698174c78e8cb22b093445bb1.tar.gz meta-impy-acfdcf2b1deeb04698174c78e8cb22b093445bb1.tar.bz2 meta-impy-acfdcf2b1deeb04698174c78e8cb22b093445bb1.tar.xz |
Second Life viewer sources 1.20.3
Diffstat (limited to '')
-rw-r--r-- | linden/indra/newview/llvovolume.cpp | 12 |
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); |