mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1178984 - Crashes at nsMenuBarX::RemoveMenuAtIndex. r=spohl
This commit is contained in:
parent
27cd1411d2
commit
e65466be3c
@ -241,7 +241,10 @@ void nsMenuBarX::RemoveMenuAtIndex(uint32_t aIndex)
|
||||
{
|
||||
NS_OBJC_BEGIN_TRY_ABORT_BLOCK;
|
||||
|
||||
NS_ASSERTION(aIndex < mMenuArray.Length(), "Attempting submenu removal with bad index!");
|
||||
if (mMenuArray.Length() <= aIndex) {
|
||||
NS_ERROR("Attempting submenu removal with bad index!");
|
||||
return;
|
||||
}
|
||||
|
||||
// Our native menu and our internal menu object array might be out of sync.
|
||||
// This happens, for example, when a submenu is hidden. Because of this we
|
||||
|
Loading…
Reference in New Issue
Block a user