From 70c1e21956b8589c9873ac5fa6a05467dc2e0a89 Mon Sep 17 00:00:00 2001 From: Graham Madarasz Date: Tue, 30 Apr 2013 13:49:46 -0700 Subject: Fix gcc ternary type inference fail to unbreak Mac and Linux builds --- indra/newview/llviewerobject.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index 584c21cf45..fe43583271 100644 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -4093,7 +4093,12 @@ S32 LLViewerObject::setTENormalMapCore(const U8 te, LLViewerTexture *image) uuid == LLUUID::null) { LLTextureEntry* tep = getTE(te); - LLMaterial* mat = tep ? tep->getMaterialParams() : NULL; + LLMaterial* mat = NULL; + if (tep) + { + mat = tep->getMaterialParams(); + } + if (mat) { mat->setNormalID(uuid); @@ -4118,7 +4123,12 @@ S32 LLViewerObject::setTESpecularMapCore(const U8 te, LLViewerTexture *image) uuid == LLUUID::null) { LLTextureEntry* tep = getTE(te); - LLMaterial* mat = tep ? tep->getMaterialParams() : NULL; + LLMaterial* mat = NULL; + if (tep) + { + mat = tep->getMaterialParams(); + } + if (mat) { mat->setSpecularID(uuid); -- cgit v1.2.3