Skip to content

Commit f253147

Browse files
committed
#4753 Crash at LLScriptFloater::setNotificationId
1 parent d5e8f51 commit f253147

1 file changed

Lines changed: 18 additions & 16 deletions

File tree

indra/newview/llscriptfloater.cpp

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -109,25 +109,27 @@ bool LLScriptFloater::toggle(const LLUUID& notification_id)
109109
LLScriptFloater* LLScriptFloater::show(const LLUUID& notification_id)
110110
{
111111
LLScriptFloater* floater = LLFloaterReg::getTypedInstance<LLScriptFloater>("script_floater", notification_id);
112-
floater->setNotificationId(notification_id);
113-
floater->createForm(notification_id);
114-
115-
//LLDialog(LLGiveInventory and LLLoadURL) should no longer steal focus (see EXT-5445)
116-
floater->setAutoFocus(false);
117-
118-
if(LLScriptFloaterManager::OBJ_SCRIPT == LLScriptFloaterManager::getObjectType(notification_id))
112+
if (floater)
119113
{
120-
floater->setSavePosition(true);
121-
floater->restorePosition();
122-
}
123-
else
124-
{
125-
floater->dockToChiclet(true);
126-
}
114+
floater->setNotificationId(notification_id);
115+
floater->createForm(notification_id);
127116

128-
//LLDialog(LLGiveInventory and LLLoadURL) should no longer steal focus (see EXT-5445)
129-
LLFloaterReg::showTypedInstance<LLScriptFloater>("script_floater", notification_id, false);
117+
//LLDialog(LLGiveInventory and LLLoadURL) should no longer steal focus (see EXT-5445)
118+
floater->setAutoFocus(false);
130119

120+
if (LLScriptFloaterManager::OBJ_SCRIPT == LLScriptFloaterManager::getObjectType(notification_id))
121+
{
122+
floater->setSavePosition(true);
123+
floater->restorePosition();
124+
}
125+
else
126+
{
127+
floater->dockToChiclet(true);
128+
}
129+
130+
//LLDialog(LLGiveInventory and LLLoadURL) should no longer steal focus (see EXT-5445)
131+
LLFloaterReg::showTypedInstance<LLScriptFloater>("script_floater", notification_id, false);
132+
}
131133
return floater;
132134
}
133135

0 commit comments

Comments
 (0)