summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/newview/llviewerobject.cpp34
1 files changed, 27 insertions, 7 deletions
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp
index 5edc3c9745..13cdcd6954 100644
--- a/indra/newview/llviewerobject.cpp
+++ b/indra/newview/llviewerobject.cpp
@@ -1434,10 +1434,14 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
setChanged(MOVED | SILHOUETTE);
}
- else if (mText.notNull())
+ else
{
- mText->markDead();
- mText = NULL;
+ if (mText.notNull())
+ {
+ mText->markDead();
+ mText = NULL;
+ }
+ mHudText.clear();
}
std::string media_url;
@@ -1812,10 +1816,14 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
setChanged(TEXTURE);
}
- else if(mText.notNull())
+ else
{
- mText->markDead();
- mText = NULL;
+ if (mText.notNull())
+ {
+ mText->markDead();
+ mText = NULL;
+ }
+ mHudText.clear();
}
std::string media_url;
@@ -4990,8 +4998,20 @@ void LLViewerObject::initHudText()
void LLViewerObject::restoreHudText()
{
- if(mText)
+ if (mHudText.empty())
{
+ if (mText)
+ {
+ mText->markDead();
+ mText = NULL;
+ }
+ }
+ else
+ {
+ if (!mText)
+ {
+ initHudText();
+ }
mText->setColor(mHudTextColor);
mText->setString(mHudText);
}