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

Unified Diff: chrome/browser/ui/browser_list.cc

Issue 686803003: Null checks to prevent occasional crash (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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/browser_list.cc
diff --git a/chrome/browser/ui/browser_list.cc b/chrome/browser/ui/browser_list.cc
index 851a9f8ca791e33639009faadca239dc3ef2017c..2c2b64f34594fe8931af99005b8d1c16363750e1 100644
--- a/chrome/browser/ui/browser_list.cc
+++ b/chrome/browser/ui/browser_list.cc
@@ -163,8 +163,10 @@ void BrowserList::TryToCloseBrowserList(const BrowserVector& browsers_to_close,
on_close_success.Run(profile_path);
for (BrowserVector::const_iterator it = browsers_to_close.begin();
- it != browsers_to_close.end(); ++it)
- (*it)->window()->Close();
+ it != browsers_to_close.end(); ++it) {
+ if (*it && (*it)->window())
Peter Kasting 2014/10/29 18:07:01 Can both these be NULL, or just one? Why do we ne
Mike Lerman 2014/10/29 18:26:06 I don't know what scenario is causing the NULLs un
+ (*it)->window()->Close();
+ }
}
// static
« 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