summaryrefslogtreecommitdiff
path: root/indra/newview/llscriptfloater.cpp
diff options
context:
space:
mode:
authorMaxim Nikolenko <maximnproductengine@lindenlab.com>2023-02-03 16:53:33 +0200
committerMaxim Nikolenko <maximnproductengine@lindenlab.com>2023-02-03 16:53:33 +0200
commit51142d1341bfd5f4f9749fe1aaf23d4f4270fe0e (patch)
tree1ced5dc14755b357886eb9fdf3606f5073ed9aaa /indra/newview/llscriptfloater.cpp
parentdb80fdb55b646164a71c58e9f4751b368afa3b9f (diff)
parent8d21d29bd7fa038db632ff90fb0e1207d0713ca2 (diff)
Merge branch 'main' into DRTVWR-567
# Conflicts: # indra/newview/llappearancemgr.cpp # indra/newview/llpanelmaininventory.cpp
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);
}
}