| Index: sky/services/inspector/server.cc
|
| diff --git a/sky/services/inspector/server.cc b/sky/services/inspector/server.cc
|
| index c5cd23e58bb2ed5e3ab8c4689dc524af0649262f..ac051e90e005e705899c4c6e54a2b9c34b62d560 100644
|
| --- a/sky/services/inspector/server.cc
|
| +++ b/sky/services/inspector/server.cc
|
| @@ -39,12 +39,14 @@ class Server : public mojo::ApplicationDelegate,
|
| mojo::ApplicationConnection* connection) override {
|
| connection->AddService<InspectorFrontend>(this);
|
| connection->AddService<InspectorServer>(this);
|
| - // The application connecting to us may implement InspectorBackend,
|
| - // attempt to establish a connection to find out. If it doesn't then this
|
| - // pipe will close.
|
| - InspectorBackendPtr backend;
|
| - connection->ConnectToService(&backend);
|
| - backends_.AddInterfacePtr(backend.Pass());
|
| + if (connection->GetServiceProvider()) {
|
| + // The application connecting to us may implement InspectorBackend,
|
| + // attempt to establish a connection to find out. If it doesn't then this
|
| + // pipe will close.
|
| + InspectorBackendPtr backend;
|
| + connection->ConnectToService(&backend);
|
| + backends_.AddInterfacePtr(backend.Pass());
|
| + }
|
| return true;
|
| }
|
|
|
|
|