diff options
Diffstat (limited to 'indra/newview/llpanelpeople.cpp')
-rw-r--r-- | indra/newview/llpanelpeople.cpp | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp index d5e289e6e6..f1380e7a36 100644 --- a/indra/newview/llpanelpeople.cpp +++ b/indra/newview/llpanelpeople.cpp @@ -526,11 +526,11 @@ LLPanelPeople::~LLPanelPeople() LLVoiceClient::getInstance()->removeObserver(this); } - delete mGroupPlusMenuHandle.get(); - delete mNearbyViewSortMenuHandle.get(); - delete mFriendsViewSortMenuHandle.get(); - delete mGroupsViewSortMenuHandle.get(); - delete mRecentViewSortMenuHandle.get(); + if (mGroupPlusMenuHandle.get()) mGroupPlusMenuHandle.get()->die(); + if (mNearbyViewSortMenuHandle.get()) mNearbyViewSortMenuHandle.get()->die(); + if (mNearbyViewSortMenuHandle.get()) mNearbyViewSortMenuHandle.get()->die(); + if (mGroupsViewSortMenuHandle.get()) mGroupsViewSortMenuHandle.get()->die(); + if (mRecentViewSortMenuHandle.get()) mRecentViewSortMenuHandle.get()->die(); } @@ -1162,8 +1162,13 @@ void LLPanelPeople::onAddFriendWizButtonClicked() { // Show add friend wizard. LLFloaterAvatarPicker* picker = LLFloaterAvatarPicker::show(boost::bind(&LLPanelPeople::onAvatarPicked, _1, _2), FALSE, TRUE); + if (!picker) + { + return; + } + // Need to disable 'ok' button when friend occurs in selection - if (picker) picker->setOkBtnEnableCb(boost::bind(&LLPanelPeople::isItemsFreeOfFriends, this, _1)); + picker->setOkBtnEnableCb(boost::bind(&LLPanelPeople::isItemsFreeOfFriends, this, _1)); LLFloater* root_floater = gFloaterView->getParentFloater(this); if (root_floater) { |