Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1419)

Unified Diff: chrome/browser/ui/views/avatar_menu_button.cc

Issue 7824052: Fix for crasher in canary. Avatar decoration in the win7 taskbar. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/avatar_menu_button.cc
===================================================================
--- chrome/browser/ui/views/avatar_menu_button.cc (revision 99394)
+++ chrome/browser/ui/views/avatar_menu_button.cc (working copy)
@@ -34,15 +34,20 @@
#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;
+ gfx::NativeWindow window = bw->GetNativeHandle();
+ if (!window)
+ return;
base::win::ScopedComPtr<ITaskbarList3> taskbar;
HRESULT result = taskbar.CreateInstance(CLSID_TaskbarList, NULL,
CLSCTX_INPROC_SERVER);
if (FAILED(result) || FAILED(taskbar->HrInit()))
return;
- gfx::NativeWindow window = browser->window()->GetNativeHandle();
- if (!window)
- return;
HICON icon = NULL;
if (bitmap) {
// Since the target size is so small, we use our best resizer.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698