#4753 Crash at LLScriptFloater::setNotificationId

meow-7.2.2
Andrey Kleshchev 2025-09-29 22:20:29 +03:00
parent d5e8f51b61
commit f25314737f
1 changed files with 18 additions and 16 deletions

View File

@ -109,25 +109,27 @@ bool LLScriptFloater::toggle(const LLUUID& notification_id)
LLScriptFloater* LLScriptFloater::show(const LLUUID& notification_id)
{
LLScriptFloater* floater = LLFloaterReg::getTypedInstance<LLScriptFloater>("script_floater", notification_id);
floater->setNotificationId(notification_id);
floater->createForm(notification_id);
//LLDialog(LLGiveInventory and LLLoadURL) should no longer steal focus (see EXT-5445)
floater->setAutoFocus(false);
if(LLScriptFloaterManager::OBJ_SCRIPT == LLScriptFloaterManager::getObjectType(notification_id))
if (floater)
{
floater->setSavePosition(true);
floater->restorePosition();
}
else
{
floater->dockToChiclet(true);
}
floater->setNotificationId(notification_id);
floater->createForm(notification_id);
//LLDialog(LLGiveInventory and LLLoadURL) should no longer steal focus (see EXT-5445)
LLFloaterReg::showTypedInstance<LLScriptFloater>("script_floater", notification_id, false);
//LLDialog(LLGiveInventory and LLLoadURL) should no longer steal focus (see EXT-5445)
floater->setAutoFocus(false);
if (LLScriptFloaterManager::OBJ_SCRIPT == LLScriptFloaterManager::getObjectType(notification_id))
{
floater->setSavePosition(true);
floater->restorePosition();
}
else
{
floater->dockToChiclet(true);
}
//LLDialog(LLGiveInventory and LLLoadURL) should no longer steal focus (see EXT-5445)
LLFloaterReg::showTypedInstance<LLScriptFloater>("script_floater", notification_id, false);
}
return floater;
}