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

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

Issue 8588013: Fix crash in SyncSetupWizard::IsVisible() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add browser test Created 9 years, 1 month 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
Index: chrome/browser/ui/webui/sync_setup_handler.cc
diff --git a/chrome/browser/ui/webui/sync_setup_handler.cc b/chrome/browser/ui/webui/sync_setup_handler.cc
index 914f823f745edb3a76a69797f61db8f241a93202..c1bad70264aed3562db447af5e1130fb5bf4e3f5 100644
--- a/chrome/browser/ui/webui/sync_setup_handler.cc
+++ b/chrome/browser/ui/webui/sync_setup_handler.cc
@@ -703,7 +703,9 @@ void SyncSetupHandler::OpenSyncSetup() {
bool SyncSetupHandler::FocusExistingWizard() {
Profile* profile = Profile::FromWebUI(web_ui_);
ProfileSyncService* service = profile->GetProfileSyncService();
- DCHECK(service);
+ if (!service)
+ return false;
+
// If the wizard is already visible, focus it.
if (service->get_wizard().IsVisible()) {
service->get_wizard().Focus();

Powered by Google App Engine
This is Rietveld 408576698