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

Unified Diff: ash/system/chromeos/network/network_icon.cc

Issue 23484018: Avoid dereferencing a NULL DeviceState in NetworkIconImpl::GetBadges(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 3 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/chromeos/network/network_icon.cc
diff --git a/ash/system/chromeos/network/network_icon.cc b/ash/system/chromeos/network/network_icon.cc
index efe7e07afc4665d94faa0632db855717734c9f86..bd32a9f8b16c246c2c01017f4fdf5f9f436e74d0 100644
--- a/ash/system/chromeos/network/network_icon.cc
+++ b/ash/system/chromeos/network/network_icon.cc
@@ -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()) {
stevenjb 2013/09/09 17:21:24 Should't this be (device && !device->provider_requ
badges->bottom_right = rb.GetImageSkiaNamed(
IconTypeIsDark(icon_type_) ?
IDR_AURA_UBER_TRAY_NETWORK_ROAMING_DARK :
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698