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

Unified Diff: chrome/browser/local_discovery/privet_notifications.cc

Issue 333243007: Don't crash on device resolution failure. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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 | « chrome/browser/local_discovery/privet_local_printer_lister.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/local_discovery/privet_notifications.cc
diff --git a/chrome/browser/local_discovery/privet_notifications.cc b/chrome/browser/local_discovery/privet_notifications.cc
index 4791199430d1b67e665630310a099c35b26387bb..5a009cc0b0a6fcbe48f0cad1a875c52c23377225 100644
--- a/chrome/browser/local_discovery/privet_notifications.cc
+++ b/chrome/browser/local_discovery/privet_notifications.cc
@@ -117,6 +117,11 @@ void PrivetNotificationsListener::DeviceChanged(
void PrivetNotificationsListener::CreateInfoOperation(
scoped_ptr<PrivetHTTPClient> http_client) {
+ if (!http_client) {
+ // Do nothing if resolution fails.
+ return;
+ }
+
std::string name = http_client->GetName();
DeviceContextMap::iterator device_iter = devices_seen_.find(name);
DCHECK(device_iter != devices_seen_.end());
« no previous file with comments | « chrome/browser/local_discovery/privet_local_printer_lister.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698