1
0
mirror of https://github.com/PurpleI2P/i2pd.git synced 2025-01-22 08:14:15 +00:00

fixed crash

This commit is contained in:
orignal 2022-12-16 15:33:56 -05:00
parent 84d9c8f1b8
commit d30ee99cf1

View File

@ -352,7 +352,7 @@ namespace i2p
if (!port) if (!port)
{ {
for (const auto& address : *addresses) for (const auto& address : *addresses)
if (address->port) if (address && address->port)
{ {
newPort = address->port; newPort = address->port;
break; break;
@ -693,7 +693,7 @@ namespace i2p
default: ; default: ;
} }
} }
port = addr->port; if (addr) port = addr->port;
} }
} }
if (!port) if (!port)