summaryrefslogtreecommitdiffstats
path: root/chrome/browser/download
diff options
context:
space:
mode:
authorahendrickson@chromium.org <ahendrickson@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-10 20:33:38 +0000
committerahendrickson@chromium.org <ahendrickson@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-10 20:33:38 +0000
commiteea624cae68a8e82cc03934f3a7db88b9b9b342b (patch)
treec7d68478b24a84d8bdc6d3acfec529f04f70af28 /chrome/browser/download
parent5cab74ad680e22614d8a61e77523943f00dffd17 (diff)
downloadchromium_src-eea624cae68a8e82cc03934f3a7db88b9b9b342b.zip
chromium_src-eea624cae68a8e82cc03934f3a7db88b9b9b342b.tar.gz
chromium_src-eea624cae68a8e82cc03934f3a7db88b9b9b342b.tar.bz2
Fixing crash in UpdateAppIconDownloadProgress().
BUG=47800 TEST=none Review URL: http://codereview.chromium.org/5965015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70928 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/download')
-rw-r--r--chrome/browser/download/download_util.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/chrome/browser/download/download_util.cc b/chrome/browser/download/download_util.cc
index f00db36..fb69263 100644
--- a/chrome/browser/download/download_util.cc
+++ b/chrome/browser/download/download_util.cc
@@ -637,7 +637,11 @@ void UpdateAppIconDownloadProgress(int download_count,
// Iterate through all the browser windows, and draw the progress bar.
for (BrowserList::const_iterator browser_iterator = BrowserList::begin();
browser_iterator != BrowserList::end(); browser_iterator++) {
- HWND frame = (*browser_iterator)->window()->GetNativeHandle();
+ Browser* browser = *browser_iterator;
+ BrowserWindow* window = browser->window();
+ if (!window)
+ continue;
+ HWND frame = window->GetNativeHandle();
if (download_count == 0 || progress == 1.0f)
taskbar->SetProgressState(frame, TBPF_NOPROGRESS);
else if (!progress_known)