Index: chrome/browser/ui/views/avatar_menu_button.cc |
=================================================================== |
--- chrome/browser/ui/views/avatar_menu_button.cc (revision 99454) |
+++ chrome/browser/ui/views/avatar_menu_button.cc (working copy) |
@@ -34,8 +34,6 @@ |
#if defined(OS_WIN) |
if (base::win::GetVersion() < base::win::VERSION_WIN7) |
return; |
- // During destruction of the browser frame, we might not have a window |
- // so the taksbar button will be removed by windows anyway. |
BrowserWindow* bw = browser->window(); |
if (!bw) |
return; |
@@ -75,6 +73,10 @@ |
} |
AvatarMenuButton::~AvatarMenuButton() { |
+ // During destruction of the browser frame, we might not have a window |
+ // so the taskbar button will be removed by windows anyway. |
+ if (browser_->IsAttemptingToCloseBrowser()) |
+ return; |
DrawTaskBarDecoration(browser_, NULL); |
} |