Commit 0c2a4274 authored by Kyle Horimoto's avatar Kyle Horimoto Committed by Commit Bot

[CrOS Settings] Fix crash for multi-profile users

A recent refactor [1] allowed KerberosCredentialsManager to be null for
secondary users. This CL adds a missing null check which fixes a crash
for multi-profile users.

[1] https://chromium-review.googlesource.com/c/chromium/src/+/2291317

Fixed: 1106721
Change-Id: Ib66eab34c84a6b0b6cce63b4d610af346dbfad77
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2306821
Auto-Submit: Kyle Horimoto <khorimoto@chromium.org>
Commit-Queue: Regan Hsu <hsuregan@chromium.org>
Reviewed-by: default avatarRegan Hsu <hsuregan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#789984}
parent d5abd1df
......@@ -1028,8 +1028,10 @@ void PeopleSection::AddKerberosAccountsPageStrings(
// Toggles the Chrome OS Kerberos Accounts submenu in the People section.
// Note that the handler is also dependent on this pref.
html_source->AddBoolean("isKerberosEnabled",
kerberos_credentials_manager_->IsKerberosEnabled());
html_source->AddBoolean(
"isKerberosEnabled",
kerberos_credentials_manager_ != nullptr &&
kerberos_credentials_manager_->IsKerberosEnabled());
PrefService* local_state = g_browser_process->local_state();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment