Index: chrome/browser/profiles/profiles_state.cc |
diff --git a/chrome/browser/profiles/profiles_state.cc b/chrome/browser/profiles/profiles_state.cc |
index dd532c29ca79870b9dabf2034715279e6a402f1f..9465e8b22df7d9161a747fb689b26c8a69b10fd8 100644 |
--- a/chrome/browser/profiles/profiles_state.cc |
+++ b/chrome/browser/profiles/profiles_state.cc |
@@ -193,7 +193,8 @@ bool SetActiveProfileToGuestIfLocked() { |
const ProfileInfoCache& cache = profile_manager->GetProfileInfoCache(); |
size_t index = cache.GetIndexOfProfileWithPath(active_profile_path); |
- if (!cache.ProfileIsSigninRequiredAtIndex(index)) |
+ if (index == std::string::npos || |
+ !cache.ProfileIsSigninRequiredAtIndex(index)) |
Mike Lerman
2015/03/31 20:48:30
nit: 2 line condition means the if needs braces, p
noms (inactive)
2015/03/31 21:01:33
Done.
|
return false; |
PrefService* local_state = g_browser_process->local_state(); |