diff options
author | Rye Mutt <rye@alchemyviewer.org> | 2024-07-22 11:02:31 -0400 |
---|---|---|
committer | Rye Mutt <rye@alchemyviewer.org> | 2024-07-22 11:02:31 -0400 |
commit | d1e8e8d24d7adb7e5a64e0495a9b71aa5acda6e4 (patch) | |
tree | 971acaa396e3bf02fe768c68f0d79adb65c01507 /indra/newview | |
parent | dbc7704a4a6d992845abf38d6bfc5d9f3ffe5893 (diff) |
Fix nullptr crash in LLFloaterIMContainer::onAddButtonClicked
Diffstat (limited to 'indra/newview')
-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); + } } } |