diff options
author | Tofu Linden <tofu.linden@lindenlab.com> | 2010-02-15 17:43:02 +0000 |
---|---|---|
committer | Tofu Linden <tofu.linden@lindenlab.com> | 2010-02-15 17:43:02 +0000 |
commit | be03975a94523ad60daa9c591fce8f901ad56b98 (patch) | |
tree | 0e334cd262d6767ffee43577c4882332a71c4c4c /indra/newview | |
parent | 1ce4089fe75ad721f0992723defc64b18e1b7bd4 (diff) |
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.
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llfloaterworldmap.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
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); } |