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

Unified Diff: chrome/browser/sync/sync_status_ui_helper.cc

Issue 283008: Fix a crash in incognito mode when clicking the wrench menu. (Closed)
Patch Set: Merged with trunk. Created 11 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/sync/sync_status_ui_helper.cc
diff --git a/chrome/browser/sync/sync_status_ui_helper.cc b/chrome/browser/sync/sync_status_ui_helper.cc
index 2c221cba3d1a05c8715148b19f3f31bba698507b..b642d3cb335df0af27019b0c8702e8dcc89cf210 100644
--- a/chrome/browser/sync/sync_status_ui_helper.cc
+++ b/chrome/browser/sync/sync_status_ui_helper.cc
@@ -63,6 +63,10 @@ SyncStatusUIHelper::MessageType SyncStatusUIHelper::GetLabels(
std::wstring* link_label) {
MessageType result_type(SYNCED);
+ if (!service) {
+ return PRE_SYNCED;
+ }
+
if (service->HasSyncSetupCompleted()) {
ProfileSyncService::Status status(service->QueryDetailedSyncStatus());
AuthErrorState auth_error(service->GetAuthErrorState());
« 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