From be03975a94523ad60daa9c591fce8f901ad56b98 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Mon, 15 Feb 2010 17:43:02 +0000 Subject: CID-131 Checker: NULL_RETURNS Function: LLFloaterWorldMap::friendsChanged() File: /indra/newview/llfloaterworldmap.cpp actually the logic looks a bit suspicious (esp for isGodLike) but I've preserved it. --- indra/newview/llfloaterworldmap.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloaterworldmap.cpp b/indra/newview/llfloaterworldmap.cpp index f4d4ea3553..83db31423c 100644 --- a/indra/newview/llfloaterworldmap.cpp +++ b/indra/newview/llfloaterworldmap.cpp @@ -788,8 +788,11 @@ void LLFloaterWorldMap::friendsChanged() if(avatar_id.notNull()) { LLCtrlSelectionInterface *iface = childGetSelectionInterface("friend combo"); - if(!iface || !iface->setCurrentByID(avatar_id) || - !t.getBuddyInfo(avatar_id)->isRightGrantedFrom(LLRelationship::GRANT_MAP_LOCATION) || gAgent.isGodlike()) + LLRelationship* buddy_info = t.getBuddyInfo(avatar_id); + if(!iface || + !iface->setCurrentByID(avatar_id) || + (buddy_info && !buddy_info->isRightGrantedFrom(LLRelationship::GRANT_MAP_LOCATION)) || + gAgent.isGodlike()) { LLTracker::stopTracking(NULL); } -- cgit v1.2.3