From b1831d23bfdd0c876ac8cf687d6d3cf02345e28e Mon Sep 17 00:00:00 2001 From: Jacek Antonelli Date: Fri, 15 Aug 2008 23:45:45 -0500 Subject: Second Life viewer sources 1.20.4 --- linden/indra/newview/llvovolume.cpp | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) (limited to 'linden/indra/newview/llvovolume.cpp') diff --git a/linden/indra/newview/llvovolume.cpp b/linden/indra/newview/llvovolume.cpp index 188c277..6b5b9bb 100644 --- a/linden/indra/newview/llvovolume.cpp +++ b/linden/indra/newview/llvovolume.cpp @@ -766,9 +766,7 @@ void LLVOVolume::sculpt() sculpt_height = raw_image->getHeight(); sculpt_width = raw_image->getWidth(); - - sculpt_components = raw_image->getComponents(); - sculpt_data = raw_image->getData(); + sculpt_components = raw_image->getComponents(); if(is_valid) { @@ -776,12 +774,18 @@ void LLVOVolume::sculpt() } if(!is_valid) { - sculpt_width = 0 ; - sculpt_height = 0 ; + sculpt_width = 0; + sculpt_height = 0; + sculpt_data = NULL ; + } + else + { + if (raw_image->getDataSize() < sculpt_height * sculpt_width * sculpt_components) + llerrs << "Sculpt: image data size = " << raw_image->getDataSize() + << " < " << sculpt_height << " x " << sculpt_width << " x " <getData(); } - - llassert_always(raw_image->getDataSize() >= sculpt_height * sculpt_width * sculpt_components); - getVolume()->sculpt(sculpt_width, sculpt_height, sculpt_components, sculpt_data, discard_level); } } -- cgit v1.1