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/llfloaterworldmap.cpp') 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 From dda7e3f7a23beacbed249d5ae9b8169bdafaad44 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Mon, 15 Feb 2010 17:47:06 +0000 Subject: some const'ness for previous fixes. --- indra/newview/llfloaterworldmap.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llfloaterworldmap.cpp') diff --git a/indra/newview/llfloaterworldmap.cpp b/indra/newview/llfloaterworldmap.cpp index 83db31423c..b6de409611 100644 --- a/indra/newview/llfloaterworldmap.cpp +++ b/indra/newview/llfloaterworldmap.cpp @@ -788,7 +788,7 @@ void LLFloaterWorldMap::friendsChanged() if(avatar_id.notNull()) { LLCtrlSelectionInterface *iface = childGetSelectionInterface("friend combo"); - LLRelationship* buddy_info = t.getBuddyInfo(avatar_id); + const LLRelationship* buddy_info = t.getBuddyInfo(avatar_id); if(!iface || !iface->setCurrentByID(avatar_id) || (buddy_info && !buddy_info->isRightGrantedFrom(LLRelationship::GRANT_MAP_LOCATION)) || -- cgit v1.2.3