mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-04 06:48:38 +09:00
[layout, XUL] Avoid accessing invalidated frame.
This commit is contained in:
parent
d4324dc064
commit
ef906c715e
1 changed files with 6 additions and 1 deletions
|
|
@ -1826,12 +1826,17 @@ nsTreeBodyFrame::RowCountChanged(int32_t aIndex, int32_t aCount)
|
|||
FireRowCountChangedEvent(aIndex, aCount);
|
||||
#endif
|
||||
|
||||
nsWeakFrame weakFrame(this);
|
||||
|
||||
// Adjust our selection.
|
||||
nsCOMPtr<nsITreeView> view = mView;
|
||||
nsCOMPtr<nsITreeSelection> sel;
|
||||
mView->GetSelection(getter_AddRefs(sel));
|
||||
view->GetSelection(getter_AddRefs(sel));
|
||||
if (sel)
|
||||
sel->AdjustSelection(aIndex, aCount);
|
||||
|
||||
NS_ENSURE_STATE (weakFrame.IsAlive());
|
||||
|
||||
if (mUpdateBatchNest)
|
||||
return NS_OK;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue