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 15:05:37 +00:00
Родитель 7b0b6dde0b
Коммит 08dd4fd7f4
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,