WebSocket: Accept multiple subprotocols
[WebKit-https.git] / Source / WebCore / websockets / WebSocketChannel.cpp
index 0173e29..3d9c4a9 100644 (file)
@@ -184,7 +184,8 @@ void WebSocketChannel::disconnect()
     LOG(Network, "WebSocketChannel %p disconnect", this);
     if (m_identifier && m_context)
         InspectorInstrumentation::didCloseWebSocket(m_context, m_identifier);
-    m_handshake->clearScriptExecutionContext();
+    if (m_handshake)
+        m_handshake->clearScriptExecutionContext();
     m_client = 0;
     m_context = 0;
     if (m_handle)