mirror of
https://git.naxdy.org/Mirror/Ryujinx.git
synced 2024-11-15 01:25:25 +00:00
Fix NRE when calling GetSockName before Bind (#6206)
This commit is contained in:
parent
f6475cca17
commit
30bdc4544e
|
@ -121,7 +121,14 @@ namespace Ryujinx.HLE.HOS.Services.Sockets.Bsd
|
|||
{
|
||||
IPEndPoint endPoint = isRemote ? socket.RemoteEndPoint : socket.LocalEndPoint;
|
||||
|
||||
context.Memory.Write(bufferPosition, BsdSockAddr.FromIPEndPoint(endPoint));
|
||||
if (endPoint != null)
|
||||
{
|
||||
context.Memory.Write(bufferPosition, BsdSockAddr.FromIPEndPoint(endPoint));
|
||||
}
|
||||
else
|
||||
{
|
||||
context.Memory.Write(bufferPosition, new BsdSockAddr());
|
||||
}
|
||||
}
|
||||
|
||||
[CommandCmif(0)]
|
||||
|
|
Loading…
Reference in a new issue