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

Unified Diff: chrome/browser/ui/webui/downloads_dom_handler.cc

Issue 10855135: Fix DownloadsDOMHandler::OnDownloadDestroyed (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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/webui/downloads_dom_handler.cc
diff --git a/chrome/browser/ui/webui/downloads_dom_handler.cc b/chrome/browser/ui/webui/downloads_dom_handler.cc
index 3c9f22dc8b17726f8fba8f69e50ba2e8b0075ff9..4116661589652bc41135a9acafeb07592d28bbef 100644
--- a/chrome/browser/ui/webui/downloads_dom_handler.cc
+++ b/chrome/browser/ui/webui/downloads_dom_handler.cc
@@ -192,7 +192,8 @@ void DownloadsDOMHandler::OnDownloadDestroyed(
OrderedDownloads::iterator it = std::find(download_items_.begin(),
download_items_.end(),
download);
- *it = NULL;
+ if (it != download_items_.end())
+ *it = NULL;
// A later ModelChanged() notification will change the WebUI's
// view of the downloads list.
}
« 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