Index: chromeos/dbus/shill_service_client.cc |
diff --git a/chromeos/dbus/shill_service_client.cc b/chromeos/dbus/shill_service_client.cc |
index 16d7767853d78e143b1e170df453e0cc029bf287..8e0ede00f565ea2ecb7d795702c48a3891816029 100644 |
--- a/chromeos/dbus/shill_service_client.cc |
+++ b/chromeos/dbus/shill_service_client.cc |
@@ -312,6 +312,11 @@ class ShillServiceClientStubImpl : public ShillServiceClient, |
virtual void Connect(const dbus::ObjectPath& service_path, |
const base::Closure& callback, |
const ErrorCallback& error_callback) OVERRIDE { |
+ base::Value* service; |
+ if (!stub_services_.Get(service_path.value(), &service)) { |
+ error_callback.Run("Error.InvalidService", "Invalid Service"); |
+ return; |
+ } |
// Set Associating |
base::StringValue associating_value(flimflam::kStateAssociation); |
SetServiceProperty(service_path.value(), |