Index: mojo/shell/public/cpp/shell.h |
diff --git a/mojo/shell/public/cpp/shell.h b/mojo/shell/public/cpp/shell.h |
index 25518c35f64533111c20d89ded488002252a1f0c..00e4605bb9197a823069cec1a6ec5f4241e8543c 100644 |
--- a/mojo/shell/public/cpp/shell.h |
+++ b/mojo/shell/public/cpp/shell.h |
@@ -50,9 +50,8 @@ class Shell { |
template <typename Interface> |
void ConnectToService(ConnectParams* params, InterfacePtr<Interface>* ptr) { |
scoped_ptr<Connection> connection = Connect(params); |
- if (!connection.get()) |
- return; |
- connection->ConnectToService(ptr); |
+ if (connection) |
+ connection->GetInterface(ptr); |
} |
template <typename Interface> |
void ConnectToService(const std::string& url, InterfacePtr<Interface>* ptr) { |