diff options
author | Rye Mutt <rye@alchemyviewer.org> | 2024-07-22 11:02:31 -0400 |
---|---|---|
committer | Andrey Kleshchev <117672381+akleshchev@users.noreply.github.com> | 2024-08-09 22:55:08 +0300 |
commit | cd188352700fd4d3b686c25f2307f4bd9179132f (patch) | |
tree | 0b380af516e432bcd7248f5d8a43010d0c0a1cc2 | |
parent | b01b53b2fea478476e67252ff5a276f943f9ae47 (diff) |
Fix nullptr crash in LLFloaterIMContainer::onAddButtonClicked
-rw-r--r-- | indra/newview/llfloaterimcontainer.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
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<LLView>("conversations_pane_buttons_expanded")->findChild<LLButton>("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); + } } } |