Commit 08982a8a authored by benchan@chromium.org's avatar benchan@chromium.org

Avoid dereferencing a NULL DeviceState in NetworkIconImpl::GetBadges().

BUG=276900

Review URL: https://chromiumcodereview.appspot.com/23484018

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@222117 0039d316-1c4b-4281-b951-d872f2087c98
parent 56ae3bcf
......@@ -620,8 +620,9 @@ void NetworkIconImpl::GetBadges(const NetworkState* network, Badges* badges) {
// For networks that are always in roaming don't show roaming badge.
const DeviceState* device =
handler->GetDeviceState(network->device_path());
DCHECK(device);
if (!device->provider_requires_roaming()) {
LOG_IF(WARNING, !device) << "Could not find device state for "
<< network->device_path();
if (!device || !device->provider_requires_roaming()) {
badges->bottom_right = rb.GetImageSkiaNamed(
IconTypeIsDark(icon_type_) ?
IDR_AURA_UBER_TRAY_NETWORK_ROAMING_DARK :
......
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