mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-30 23:50:19 -07:00
catch nullptr on websocket connections (#4300)
* catch nullptr on websocket connections * clangify
This commit is contained in:
@@ -1692,6 +1692,9 @@ WebsocketServerSocketInterface::~WebsocketServerSocketInterface()
|
||||
|
||||
void WebsocketServerSocketInterface::initConnection(void *_socket)
|
||||
{
|
||||
if (_socket == nullptr) {
|
||||
return;
|
||||
}
|
||||
socket = (QWebSocket *)_socket;
|
||||
socket->setParent(this);
|
||||
address = socket->peerAddress();
|
||||
|
||||
Reference in New Issue
Block a user