зеркало из https://github.com/mozilla/pjs.git
Fix deleting active menuitem from crashing b=250276 p=vlad r=ben sr=shaver a=asa
This commit is contained in:
Родитель
a54e433303
Коммит
eacf2c8722
|
@ -335,6 +335,16 @@ nsMenuFrame::DestroyPopupFrames(nsPresContext* aPresContext)
|
|||
NS_IMETHODIMP
|
||||
nsMenuFrame::Destroy(nsPresContext* aPresContext)
|
||||
{
|
||||
// are we our menu parent's current menu item?
|
||||
if (mMenuParent) {
|
||||
nsIMenuFrame *curItem = nsnull;
|
||||
mMenuParent->GetCurrentMenuItem(&curItem);
|
||||
if (curItem == this) {
|
||||
// yes; tell it that we're going away
|
||||
mMenuParent->SetCurrentMenuItem(nsnull);
|
||||
}
|
||||
}
|
||||
|
||||
DestroyPopupFrames(aPresContext);
|
||||
return nsBoxFrame::Destroy(aPresContext);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче