EXT-8628 FIXED Crash in LLVOAvatarSelf::getAttachedPointName().

The crash was reproducible only on startup. Apparently, gAgentAvatarp was not valid at that point.
Worked around by checking gAgentAvatarp for being valid.

I didn't investigate what the root cause of the problem was (probably the new multi-attachments implementation), I just needed my viewer to work.

Reviewed by Seraph at https://codereview.productengine.com/secondlife/r/847/.

--HG--
branch : product-engine
meow-7.2.2
Sergei Litovchuk 2010-08-12 15:56:51 +03:00
parent 7a0b016c8c
commit dd692f17ab
1 changed files with 5 additions and 0 deletions

View File

@ -3985,6 +3985,11 @@ std::string LLObjectBridge::getLabelSuffix() const
{
if (get_is_item_worn(mUUID))
{
if (!isAgentAvatarValid())
{
return LLItemBridge::getLabelSuffix() + LLTrans::getString("worn");
}
std::string attachment_point_name = gAgentAvatarp->getAttachedPointName(mUUID);
// e.g. "(worn on ...)" / "(attached to ...)"