Crash on quit when only an extension's custom window is open. b=429215 r=josh sr=vlad a=vlad

This commit is contained in:
smichaud@pobox.com 2008-04-18 08:05:37 -07:00
Родитель 9eb2e9a7c3
Коммит c9a90c5b47
1 изменённых файлов: 5 добавлений и 0 удалений

Просмотреть файл

@ -119,6 +119,9 @@ nsMenuBarX::~nsMenuBarX()
{
NS_OBJC_BEGIN_TRY_ABORT_BLOCK;
if (nsMenuBarX::sLastGeckoMenuBarPainted == this)
nsMenuBarX::sLastGeckoMenuBarPainted = nsnull;
mMenusArray.Clear(); // release all menus
// the quit/pref items of a random window might have been used if there was no
@ -997,6 +1000,8 @@ static BOOL gMenuEffectsOnly = NO;
int tag = [sender tag];
nsMenuBarX* menuBar = nsMenuBarX::sLastGeckoMenuBarPainted;
if (!menuBar)
return;
// We want to avoid processing app-global commands when we are asked to
// perform native menu effects only. This avoids sending events twice,