Index: services/shell/public/cpp/lib/interface_provider.cc |
diff --git a/services/shell/public/cpp/lib/interface_provider.cc b/services/shell/public/cpp/lib/interface_provider.cc |
index 209d356ac476bb6a79d8cfc51f389500c8b297b7..63a8753e5a3127348fcf7f70c1b66dfaeb6c4ab3 100644 |
--- a/services/shell/public/cpp/lib/interface_provider.cc |
+++ b/services/shell/public/cpp/lib/interface_provider.cc |
@@ -19,7 +19,8 @@ void InterfaceProvider::Bind(mojom::InterfaceProviderPtr interface_provider) { |
void InterfaceProvider::SetConnectionLostClosure( |
const base::Closure& connection_lost_closure) { |
- interface_provider_.set_connection_error_handler(connection_lost_closure); |
+ if (interface_provider_) |
+ interface_provider_.set_connection_error_handler(connection_lost_closure); |
} |
base::WeakPtr<InterfaceProvider> InterfaceProvider::GetWeakPtr() { |
@@ -35,7 +36,8 @@ void InterfaceProvider::GetInterface( |
it->second.Run(std::move(request_handle)); |
return; |
} |
- interface_provider_->GetInterface(name, std::move(request_handle)); |
+ if (interface_provider_) |
+ interface_provider_->GetInterface(name, std::move(request_handle)); |
} |
void InterfaceProvider::ClearBinders() { |