From e1e7f78b588b31314a71ccc07222f66e84d98871 Mon Sep 17 00:00:00 2001 From: "Nyx (Neal Orman)" Date: Tue, 2 Mar 2010 14:39:08 -0500 Subject: EXT-5848 Getting a lot of warning spam before ATI crash Warning was extraneous and non-related to crash. Initialized a pointer to be NULL before calling setInfo, which seems to clear up warning. Updated comments around this to explain what I've found Code reviewed by Seraph --- indra/newview/lltexlayer.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'indra/newview/lltexlayer.cpp') diff --git a/indra/newview/lltexlayer.cpp b/indra/newview/lltexlayer.cpp index 662e6dcabe..6ed95f2cbf 100644 --- a/indra/newview/lltexlayer.cpp +++ b/indra/newview/lltexlayer.cpp @@ -1130,7 +1130,8 @@ LLTexLayerInterface::LLTexLayerInterface(LLTexLayerSet* const layer_set): } LLTexLayerInterface::LLTexLayerInterface(const LLTexLayerInterface &layer, LLWearable *wearable): - mTexLayerSet( layer.mTexLayerSet ) + mTexLayerSet( layer.mTexLayerSet ), + mInfo(NULL) { // don't add visual params for cloned layers setInfo(layer.getInfo(), wearable); @@ -1140,11 +1141,12 @@ LLTexLayerInterface::LLTexLayerInterface(const LLTexLayerInterface &layer, LLWea BOOL LLTexLayerInterface::setInfo(const LLTexLayerInfo *info, LLWearable* wearable ) // This sets mInfo and calls initialization functions { - //llassert(mInfo == NULL); // nyx says this is probably bogus but needs investigating - if (mInfo != NULL) // above llassert(), but softened into a warning - { - llwarns << "BAD STUFF! mInfo != NULL" << llendl; - } + // setInfo should only be called once. Code is not robust enough to handle redefinition of a texlayer. + // Not a critical warning, but could be useful for debugging later issues. -Nyx + if (mInfo != NULL) + { + llwarns << "mInfo != NULL" << llendl; + } mInfo = info; //mID = info->mID; // No ID -- cgit v1.2.3 From dc44d2dc1aec9661273abc7c2d78d290369c21cd Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Wed, 10 Mar 2010 18:24:02 -0700 Subject: a try to fix EXT-5845: crash on LLTexLayerTemplate::render [secondlife-bin lltexlayer.cpp:1898] --- indra/newview/lltexlayer.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'indra/newview/lltexlayer.cpp') diff --git a/indra/newview/lltexlayer.cpp b/indra/newview/lltexlayer.cpp index 6ed95f2cbf..386b636367 100644 --- a/indra/newview/lltexlayer.cpp +++ b/indra/newview/lltexlayer.cpp @@ -1883,6 +1883,11 @@ LLTexLayer* LLTexLayerTemplate::getLayer(U32 i) /*virtual*/ BOOL LLTexLayerTemplate::render(S32 x, S32 y, S32 width, S32 height) { + if(!mInfo) + { + return FALSE ; + } + BOOL success = TRUE; updateWearableCache(); for (wearable_cache_t::const_iterator iter = mWearableCache.begin(); iter!= mWearableCache.end(); iter++) -- cgit v1.2.3