diff options
Diffstat (limited to 'remoting/host/event_executor_linux.cc')
-rw-r--r-- | remoting/host/event_executor_linux.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/remoting/host/event_executor_linux.cc b/remoting/host/event_executor_linux.cc index f2e68b8..7295c1a 100644 --- a/remoting/host/event_executor_linux.cc +++ b/remoting/host/event_executor_linux.cc @@ -426,14 +426,14 @@ void EventExecutorLinux::InjectMouseEvent(const MouseEvent& event) { } // namespace -EventExecutor* EventExecutor::Create(MessageLoop* message_loop, - Capturer* capturer) { - EventExecutorLinux* executor = new EventExecutorLinux(message_loop, capturer); +scoped_ptr<protocol::InputStub> EventExecutor::Create(MessageLoop* message_loop, + Capturer* capturer) { + scoped_ptr<EventExecutorLinux> executor( + new EventExecutorLinux(message_loop, capturer)); if (!executor->Init()) { - delete executor; - executor = NULL; + executor.reset(NULL); } - return executor; + return executor.PassAs<protocol::InputStub>(); } } // namespace remoting |