summaryrefslogtreecommitdiff
path: root/indra/newview/llscriptfloater.cpp
diff options
context:
space:
mode:
authorKitty Barnett <develop@catznip.com>2023-02-08 17:18:37 +0100
committerKitty Barnett <develop@catznip.com>2023-02-08 17:18:37 +0100
commit77afc073c54d6d03b7a24276a08d1924372058d0 (patch)
tree95f472eabe4407cca653af3a867808f32402551c /indra/newview/llscriptfloater.cpp
parent5805bbd8104e66fb9ae7ed3c22e374e377b2f2e1 (diff)
parent4df2c0b8d67af267d3c9c6d58d63df3ed063a89e (diff)
Merge branch 'xcode-14.1' into DRTVWR-489-emoji
Diffstat (limited to 'indra/newview/llscriptfloater.cpp')
-rw-r--r--indra/newview/llscriptfloater.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/indra/newview/llscriptfloater.cpp b/indra/newview/llscriptfloater.cpp
index da912ef3d4..6a27ff3047 100644
--- a/indra/newview/llscriptfloater.cpp
+++ b/indra/newview/llscriptfloater.cpp
@@ -460,10 +460,11 @@ void LLScriptFloaterManager::onAddNotification(const LLUUID& notification_id)
if(it != mNotifications.end())
{
+ LLUUID old_id = it->first; // copy LLUUID to prevent use after free when it is erased below
LLChicletPanel * chiclet_panelp = LLChicletBar::getInstance()->getChicletPanel();
if (NULL != chiclet_panelp)
{
- LLIMChiclet * chicletp = chiclet_panelp->findChiclet<LLIMChiclet>(it->first);
+ LLIMChiclet * chicletp = chiclet_panelp->findChiclet<LLIMChiclet>(old_id);
if (NULL != chicletp)
{
// Pass the new_message icon state further.
@@ -472,14 +473,14 @@ void LLScriptFloaterManager::onAddNotification(const LLUUID& notification_id)
}
}
- LLScriptFloater* floater = LLFloaterReg::findTypedInstance<LLScriptFloater>("script_floater", it->first);
+ LLScriptFloater* floater = LLFloaterReg::findTypedInstance<LLScriptFloater>("script_floater", old_id);
if (floater)
{
// Generate chiclet with a "new message" indicator if a docked window was opened but not in focus. See EXT-3142.
set_new_message |= !floater->hasFocus();
}
- removeNotification(it->first);
+ removeNotification(old_id);
}
}