FIRE-20227; do not derefence nullptrs.

meow-7.2.2
Nicky 2016-10-23 23:43:41 +02:00
parent 40c06f4836
commit 67cdfe30eb
1 changed files with 9 additions and 2 deletions

View File

@ -6186,8 +6186,15 @@ void LLVOAvatar::addAttachmentOverridesForObject(LLViewerObject *vo)
LL_WARNS("Avatar") << "called with invalid avatar" << LL_ENDL;
}
LLScopedContextString str("addAttachmentOverridesForObject " + av->getFullname());
// <FS:ND> FIRE-20227; Do not use av name if av is not valid
// LLScopedContextString str("addAttachmentOverridesForObject " + av->getFullname());
std::unique_ptr< LLScopedContextString > str;
if( av )
str.reset( new LLScopedContextString( "addAttachmentOverridesForObject " + av->getFullname()) );
else
str.reset( new LLScopedContextString( "addAttachmentOverridesForObject invalid avi" ) );
// </FS:ND>
// Process all children
LLViewerObject::const_child_list_t& children = vo->getChildren();
for (LLViewerObject::const_child_list_t::const_iterator it = children.begin();