mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-26 16:43:55 -07:00
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)
|
void WebsocketServerSocketInterface::initConnection(void *_socket)
|
||||||
{
|
{
|
||||||
|
if (_socket == nullptr) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
socket = (QWebSocket *)_socket;
|
socket = (QWebSocket *)_socket;
|
||||||
socket->setParent(this);
|
socket->setParent(this);
|
||||||
address = socket->peerAddress();
|
address = socket->peerAddress();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue