catch nullptr on websocket connections (#4300)
* catch nullptr on websocket connections * clangify
This commit is contained in:
parent
8e954b10e6
commit
b940e17fe7
1 changed files with 3 additions and 0 deletions
|
@ -1692,6 +1692,9 @@ WebsocketServerSocketInterface::~WebsocketServerSocketInterface()
|
|||
|
||||
void WebsocketServerSocketInterface::initConnection(void *_socket)
|
||||
{
|
||||
if (_socket == nullptr) {
|
||||
return;
|
||||
}
|
||||
socket = (QWebSocket *)_socket;
|
||||
socket->setParent(this);
|
||||
address = socket->peerAddress();
|
||||
|
|
Loading…
Reference in a new issue