summaryrefslogtreecommitdiffstats
path: root/net/websockets
diff options
context:
space:
mode:
Diffstat (limited to 'net/websockets')
-rw-r--r--net/websockets/websocket_job.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/websockets/websocket_job.cc b/net/websockets/websocket_job.cc
index 3ba0c36..59acfc5 100644
--- a/net/websockets/websocket_job.cc
+++ b/net/websockets/websocket_job.cc
@@ -129,7 +129,8 @@ void WebSocketJob::RestartWithAuth(
void WebSocketJob::DetachDelegate() {
state_ = CLOSED;
delegate_ = NULL;
- socket_->DetachDelegate();
+ if (socket_)
+ socket_->DetachDelegate();
socket_ = NULL;
}