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

Unified Diff: chrome/browser/profiles/profile_manager.cc

Issue 2240823003: Avoid a crash in ProfileManager::GetLastUsedProfileAllowedByPolicy() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: schedule next refresh Created 4 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 | « chrome/browser/media/tab_desktop_media_list.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/profiles/profile_manager.cc
diff --git a/chrome/browser/profiles/profile_manager.cc b/chrome/browser/profiles/profile_manager.cc
index becbbe83f74e625e94b16b4d14f564f08908a07e..1cfc620eedaf53b5c74ea52a6c12d04fe4adcd38 100644
--- a/chrome/browser/profiles/profile_manager.cc
+++ b/chrome/browser/profiles/profile_manager.cc
@@ -371,6 +371,8 @@ Profile* ProfileManager::GetLastUsedProfile() {
// static
Profile* ProfileManager::GetLastUsedProfileAllowedByPolicy() {
Profile* profile = GetLastUsedProfile();
+ if (!profile)
+ return nullptr;
if (IncognitoModeForced(profile))
return profile->GetOffTheRecordProfile();
return profile;
« no previous file with comments | « chrome/browser/media/tab_desktop_media_list.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698