Skip to content

Commit cc43f42

Browse files
committed
SL-20416 Fix Crash Report 1409376 (update)
1 parent c5f4eb3 commit cc43f42

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

indra/llui/llfloater.cpp

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -506,6 +506,7 @@ void LLFloater::enableResizeCtrls(bool enable, bool width, bool height)
506506

507507
void LLFloater::destroy()
508508
{
509+
gFloaterView->onDestroyFloater(this);
509510
// LLFloaterReg should be synchronized with "dead" floater to avoid returning dead instance before
510511
// it was deleted via LLMortician::updateClass(). See EXT-8458.
511512
LLFloaterReg::removeInstance(mInstanceName, mKey);
@@ -2572,7 +2573,7 @@ void LLFloaterView::bringToFront(LLFloater* child, BOOL give_focus, BOOL restore
25722573
return;
25732574
}
25742575

2575-
if (mFrontChild && !mFrontChild->isDead() && mFrontChild->getVisible())
2576+
if (mFrontChild)
25762577
{
25772578
mFrontChild->goneFromFront();
25782579
}
@@ -3234,6 +3235,14 @@ void LLFloaterView::setToolbarRect(LLToolBarEnums::EToolBarLocation tb, const LL
32343235
}
32353236
}
32363237

3238+
void LLFloaterView::onDestroyFloater(LLFloater* floater)
3239+
{
3240+
if (mFrontChild == floater)
3241+
{
3242+
mFrontChild = nullptr;
3243+
}
3244+
}
3245+
32373246
void LLFloater::setInstanceName(const std::string& name)
32383247
{
32393248
if (name != mInstanceName)

indra/llui/llfloater.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -607,6 +607,7 @@ class LLFloaterView : public LLUICtrl
607607
LLFloater* getFrontmostClosableFloater();
608608

609609
void setToolbarRect(LLToolBarEnums::EToolBarLocation tb, const LLRect& toolbar_rect);
610+
void onDestroyFloater(LLFloater* floater);
610611

611612
private:
612613
void hiddenFloaterClosed(LLFloater* floater);

0 commit comments

Comments
 (0)