Index: remoting/host/desktop_process.cc |
diff --git a/remoting/host/desktop_process.cc b/remoting/host/desktop_process.cc |
index 2785a29688604b59f12c3db4fdfa1630da06586f..a994e2207dce8d50d82b79a41a75275acdc03e09 100644 |
--- a/remoting/host/desktop_process.cc |
+++ b/remoting/host/desktop_process.cc |
@@ -71,12 +71,13 @@ void DesktopProcess::OnChannelConnected(int32 peer_pid) { |
} |
void DesktopProcess::OnChannelError() { |
- DCHECK(caller_task_runner_->BelongsToCurrentThread()); |
- |
// Shutdown the desktop process. |
daemon_channel_.reset(); |
- desktop_agent_->Stop(); |
- desktop_agent_ = NULL; |
+ if (desktop_agent_) { |
+ desktop_agent_->Stop(); |
+ desktop_agent_ = NULL; |
+ } |
+ |
caller_task_runner_ = NULL; |
} |