1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Fix possible nullptr dereference in serverpackethandler.cpp

This commit is contained in:
Ricardo Costa 2025-03-26 14:31:27 -03:00 committed by GitHub
parent b1363fce8e
commit 251bf0ec31
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -416,6 +416,8 @@ void Server::handleCommand_GotBlocks(NetworkPacket* pkt)
ClientInterface::AutoLock lock(m_clients);
RemoteClient *client = m_clients.lockedGetClientNoEx(pkt->getPeerId());
if (!client)
return;
for (u16 i = 0; i < count; i++) {
v3s16 p;
@ -538,6 +540,8 @@ void Server::handleCommand_DeletedBlocks(NetworkPacket* pkt)
ClientInterface::AutoLock lock(m_clients);
RemoteClient *client = m_clients.lockedGetClientNoEx(pkt->getPeerId());
if (!client)
return;
for (u16 i = 0; i < count; i++) {
v3s16 p;