From f106ef838397f62261e7ec4e94f96848f37acf19 Mon Sep 17 00:00:00 2001 From: Jonathan Yap Date: Fri, 3 Feb 2012 09:02:01 -0500 Subject: STORM-1793 Fix bad assumption in getAvatars --- indra/newview/llworld.cpp | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'indra') diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp index 86780d0604..bbe440e14f 100644 --- a/indra/newview/llworld.cpp +++ b/indra/newview/llworld.cpp @@ -1193,12 +1193,17 @@ void LLWorld::getAvatars(uuid_vec_t* avatar_ids, std::vector* positi if( !pVOAvatar->isDead() && !pVOAvatar->isSelf() && !uuid.isNull() && - dist_vec_squared(pos_global, relative_to) <= radius_squared && - positions != NULL && - avatar_ids != NULL) - { - positions->push_back(pos_global); - avatar_ids->push_back(uuid); + dist_vec_squared(pos_global, relative_to) <= radius_squared) + { + if(positions != NULL) + { + positions->push_back(pos_global); + } + if(avatar_ids !=NULL) + { + avatar_ids->push_back(uuid); + } + } } } // region avatars added for situations where radius is greater than RenderFarClip -- cgit v1.2.3