diff options
author | Nyx (Neal Orman) <nyx@lindenlab.com> | 2010-03-02 14:39:08 -0500 |
---|---|---|
committer | Nyx (Neal Orman) <nyx@lindenlab.com> | 2010-03-02 14:39:08 -0500 |
commit | e1e7f78b588b31314a71ccc07222f66e84d98871 (patch) | |
tree | 439a870bd9531915ff06d91d6a2b1d1a571ad9c2 /indra | |
parent | 6575b685e91d334198789c88dec2efab7e5a1ac9 (diff) |
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
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/lltexlayer.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
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 |