Commit c62443b8 authored by Ahmed Mehfooz's avatar Ahmed Mehfooz Committed by Chromium LUCI CQ

Speculative fix for crash happening on opening network settings

Adding null check for system tray client and deleting bubble
after all other code has executed.

Bug: 1163636
Change-Id: I6522dcf42a4909dffc8e1cfa8c6a56112d4c7319
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2615673Reviewed-by: default avatarToni Baržić <tbarzic@chromium.org>
Commit-Queue: Ahmed Mehfooz <amehfooz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#841267}
parent 4498f757
......@@ -323,10 +323,17 @@ void NetworkStateListDetailedView::ShowSettings() {
Shell::Get()->metrics()->RecordUserMetricsAction(
list_type_ == LIST_TYPE_VPN ? UMA_STATUS_AREA_VPN_SETTINGS_OPENED
: UMA_STATUS_AREA_NETWORK_SETTINGS_OPENED);
SystemTrayClient* system_tray_client =
Shell::Get()->system_tray_model()->client();
if (system_tray_client) {
system_tray_client->ShowNetworkSettings(
model_->default_network() ? model_->default_network()->guid
: std::string());
}
CloseBubble(); // Deletes |this|.
Shell::Get()->system_tray_model()->client()->ShowNetworkSettings(
model_->default_network() ? model_->default_network()->guid
: std::string());
}
void NetworkStateListDetailedView::UpdateHeaderButtons() {
......
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