From 3f4550960a5b379c10805f106074237de6c7a52d Mon Sep 17 00:00:00 2001 From: "ukai@chromium.org" Date: Mon, 1 Mar 2010 03:49:31 +0000 Subject: Fix crash in ExtensionApiTest.FLAKY_WebSocket TBR=darin BUG=none TEST=browser_tests ExtensionApiTest.FLAKY_WebSocket doesn't crash Review URL: http://codereview.chromium.org/660259 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40253 0039d316-1c4b-4281-b951-d872f2087c98 --- net/websockets/websocket_job.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; } -- cgit v1.1