From cd188352700fd4d3b686c25f2307f4bd9179132f Mon Sep 17 00:00:00 2001 From: Rye Mutt Date: Mon, 22 Jul 2024 11:02:31 -0400 Subject: Fix nullptr crash in LLFloaterIMContainer::onAddButtonClicked --- indra/newview/llfloaterimcontainer.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'indra/newview/llfloaterimcontainer.cpp') diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp index add389748f..08e13276b3 100644 --- a/indra/newview/llfloaterimcontainer.cpp +++ b/indra/newview/llfloaterimcontainer.cpp @@ -988,11 +988,14 @@ void LLFloaterIMContainer::onAddButtonClicked() { LLView * button = findChild("conversations_pane_buttons_expanded")->findChild("add_btn"); LLFloater* root_floater = gFloaterView->getParentFloater(this); - LLFloaterAvatarPicker* picker = LLFloaterAvatarPicker::show(boost::bind(&LLFloaterIMContainer::onAvatarPicked, this, _1), true, true, true, root_floater->getName(), button); - - if (picker && root_floater) + if (button && root_floater) { - root_floater->addDependentFloater(picker); + LLFloaterAvatarPicker* picker = LLFloaterAvatarPicker::show(boost::bind(&LLFloaterIMContainer::onAvatarPicked, this, _1), true, true, true, root_floater->getName(), button); + + if (picker) + { + root_floater->addDependentFloater(picker); + } } } -- cgit v1.2.3 From 7cc3ff55b97b94a3b52daebfe072eb22192c710b Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Fri, 16 Aug 2024 19:27:48 +0300 Subject: viewer#2296 Don't show 'are you sure you want to leave the call' when shutting down --- indra/newview/llfloaterimcontainer.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'indra/newview/llfloaterimcontainer.cpp') diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp index 08e13276b3..cf66507a66 100644 --- a/indra/newview/llfloaterimcontainer.cpp +++ b/indra/newview/llfloaterimcontainer.cpp @@ -2432,7 +2432,7 @@ void LLFloaterIMContainer::closeHostedFloater() onClickCloseBtn(); } -void LLFloaterIMContainer::closeAllConversations() +void LLFloaterIMContainer::closeAllConversations(bool app_quitting) { std::vector ids; for (conversations_items_map::iterator it_session = mConversationsItems.begin(); it_session != mConversationsItems.end(); it_session++) @@ -2447,7 +2447,7 @@ void LLFloaterIMContainer::closeAllConversations() for (std::vector::const_iterator it = ids.begin(); it != ids.end(); ++it) { LLFloaterIMSession *conversationFloater = LLFloaterIMSession::findInstance(*it); - LLFloater::onClickClose(conversationFloater); + LLFloater::onClickClose(conversationFloater, app_quitting); } } @@ -2470,7 +2470,7 @@ void LLFloaterIMContainer::closeFloater(bool app_quitting/* = false*/) { if(app_quitting) { - closeAllConversations(); + closeAllConversations(app_quitting); onClickCloseBtn(app_quitting); } else -- cgit v1.2.3