diff options
| -rwxr-xr-x | indra/newview/llpanelface.cpp | 2 | ||||
| -rwxr-xr-x | indra/newview/llviewerobject.cpp | 9 | 
2 files changed, 5 insertions, 6 deletions
diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp index 1a3f4832fd..74b1915cac 100755 --- a/indra/newview/llpanelface.cpp +++ b/indra/newview/llpanelface.cpp @@ -2118,7 +2118,7 @@ void LLPanelFace::updateShinyControls(LLUICtrl* ctrl, void* userdata, bool mess_  	bool show_media = (materials_media == MATMEDIA_MEDIA) && combo_matmedia->getEnabled();  	bool show_shininess = (!show_media) && (material_type == MATTYPE_SPECULAR) && combo_matmedia->getEnabled();  	U32 shiny_value = comboShiny->getCurrentIndex(); -	bool show_shinyctrls = (shiny_value != 0) && show_shininess; // Use texture +	bool show_shinyctrls = (shiny_value == SHINY_TEXTURE) && show_shininess; // Use texture  	self->getChildView("label glossiness")->setVisible(show_shinyctrls);  	self->getChildView("glossiness")->setVisible(show_shinyctrls);  	self->getChildView("label environment")->setVisible(show_shinyctrls); diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index 9366c901da..7c50abf53b 100755 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -4102,7 +4102,7 @@ S32 LLViewerObject::setTENormalMapCore(const U8 te, LLViewerTexture *image)  {  	llassert(image);  	S32 retval = TEM_CHANGE_TEXTURE; -	const LLUUID& uuid = image->getID(); +	const LLUUID& uuid = image ? image->getID() : LLUUID::null;  	if (uuid != getTE(te)->getID() ||  		uuid == LLUUID::null)  	{ @@ -4130,9 +4130,8 @@ S32 LLViewerObject::setTENormalMapCore(const U8 te, LLViewerTexture *image)  S32 LLViewerObject::setTESpecularMapCore(const U8 te, LLViewerTexture *image)  { -	llassert(image);  	S32 retval = TEM_CHANGE_TEXTURE; -	const LLUUID& uuid = image->getID(); +	const LLUUID& uuid = image ? image->getID() : LLUUID::null;  	if (uuid != getTE(te)->getID() ||  		uuid == LLUUID::null)  	{ @@ -4195,14 +4194,14 @@ S32 LLViewerObject::setTETexture(const U8 te, const LLUUID& uuid)  S32 LLViewerObject::setTENormalMap(const U8 te, const LLUUID& uuid)  { -	LLViewerFetchedTexture *image = LLViewerTextureManager::getFetchedTexture( +	LLViewerFetchedTexture *image = (uuid == LLUUID::null) ? NULL : LLViewerTextureManager::getFetchedTexture(  		uuid, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE, 0, 0, LLHost::invalid);  	return setTENormalMapCore(te, image);  }  S32 LLViewerObject::setTESpecularMap(const U8 te, const LLUUID& uuid)  { -	LLViewerFetchedTexture *image = LLViewerTextureManager::getFetchedTexture( +	LLViewerFetchedTexture *image = (uuid == LLUUID::null) ? NULL : LLViewerTextureManager::getFetchedTexture(  		uuid, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE, 0, 0, LLHost::invalid);  	return setTESpecularMapCore(te, image);  }  | 
