[layout, XUL] Avoid accessing invalidated frame.
parent
6a6db2ef0f
commit
8a7d4550aa
|
@ -1826,12 +1826,17 @@ nsTreeBodyFrame::RowCountChanged(int32_t aIndex, int32_t aCount)
|
||||||
FireRowCountChangedEvent(aIndex, aCount);
|
FireRowCountChangedEvent(aIndex, aCount);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
nsWeakFrame weakFrame(this);
|
||||||
|
|
||||||
// Adjust our selection.
|
// Adjust our selection.
|
||||||
|
nsCOMPtr<nsITreeView> view = mView;
|
||||||
nsCOMPtr<nsITreeSelection> sel;
|
nsCOMPtr<nsITreeSelection> sel;
|
||||||
mView->GetSelection(getter_AddRefs(sel));
|
view->GetSelection(getter_AddRefs(sel));
|
||||||
if (sel)
|
if (sel)
|
||||||
sel->AdjustSelection(aIndex, aCount);
|
sel->AdjustSelection(aIndex, aCount);
|
||||||
|
|
||||||
|
NS_ENSURE_STATE (weakFrame.IsAlive());
|
||||||
|
|
||||||
if (mUpdateBatchNest)
|
if (mUpdateBatchNest)
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue