mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-02-24 21:40:10 +00:00
Merge pull request #11526 from AdmiralCurtiss/netplay-crash
ENetUtil: Add check for valid socket in SendPacket().
This commit is contained in:
commit
fbb3db71b2
@ -39,6 +39,12 @@ int ENET_CALLBACK InterceptCallback(ENetHost* host, ENetEvent* event)
|
||||
|
||||
bool SendPacket(ENetPeer* socket, const sf::Packet& packet, u8 channel_id)
|
||||
{
|
||||
if (!socket)
|
||||
{
|
||||
ERROR_LOG_FMT(NETPLAY, "Target socket is null.");
|
||||
return false;
|
||||
}
|
||||
|
||||
ENetPacket* epac =
|
||||
enet_packet_create(packet.getData(), packet.getDataSize(), ENET_PACKET_FLAG_RELIABLE);
|
||||
if (!epac)
|
||||
|
Loading…
x
Reference in New Issue
Block a user