diff options
author | Kent Quirk <q@lindenlab.com> | 2010-02-16 23:36:54 -0500 |
---|---|---|
committer | Kent Quirk <q@lindenlab.com> | 2010-02-16 23:36:54 -0500 |
commit | e3a71c74e24cc052bab14544730bcd9bcef35ca8 (patch) | |
tree | 109f6c98feea64f01330960407634eee9196356b /indra/newview/llviewermenu.cpp | |
parent | 69032d8d9d660de5b3c97589b7cc55dac70b153c (diff) | |
parent | 6552874c82ed5ed09cf0a4d16351cdd5c8698755 (diff) |
automated merge from viewer-2-0
Diffstat (limited to 'indra/newview/llviewermenu.cpp')
-rw-r--r-- | indra/newview/llviewermenu.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 8c61ba7558..24a788aaed 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -3554,9 +3554,15 @@ bool LLHaveCallingcard::operator()(LLInventoryCategory* cat, BOOL is_agent_mappable(const LLUUID& agent_id) { - return (LLAvatarActions::isFriend(agent_id) && - LLAvatarTracker::instance().getBuddyInfo(agent_id)->isOnline() && - LLAvatarTracker::instance().getBuddyInfo(agent_id)->isRightGrantedFrom(LLRelationship::GRANT_MAP_LOCATION) + const LLRelationship* buddy_info = NULL; + bool is_friend = LLAvatarActions::isFriend(agent_id); + + if (is_friend) + buddy_info = LLAvatarTracker::instance().getBuddyInfo(agent_id); + + return (buddy_info && + buddy_info->isOnline() && + buddy_info->isRightGrantedFrom(LLRelationship::GRANT_MAP_LOCATION) ); } @@ -6402,7 +6408,6 @@ class LLToolsSelectedScriptAction : public view_listener_t else { llwarns << "Failed to generate LLFloaterScriptQueue with action: " << action << llendl; - delete queue; } return true; } |