From 67cdfe30eb1d40187858d45024ea1c4b71d2af8b Mon Sep 17 00:00:00 2001 From: Nicky Date: Sun, 23 Oct 2016 23:43:41 +0200 Subject: [PATCH] FIRE-20227; do not derefence nullptrs. --- indra/newview/llvoavatar.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index a13c08948b..5a7708e3bc 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -6186,8 +6186,15 @@ void LLVOAvatar::addAttachmentOverridesForObject(LLViewerObject *vo) LL_WARNS("Avatar") << "called with invalid avatar" << LL_ENDL; } - LLScopedContextString str("addAttachmentOverridesForObject " + av->getFullname()); - + // 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" ) ); + // + // Process all children LLViewerObject::const_child_list_t& children = vo->getChildren(); for (LLViewerObject::const_child_list_t::const_iterator it = children.begin();