Skip to content

Commit 1dfecba

Browse files
committed
Prevent crash calling uninitialized NTRIP Server networkClient
I'm seeing the code crash at line 400 when I add a second NTRIP Server (when the first is already running) I think we're calling connected when the networkClient hasn't yet been initialized?
1 parent 56bf04e commit 1dfecba

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Firmware/RTK_Everywhere/NtripServer.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,7 @@ void ntripServerProcessRTCM(int serverIndex, uint8_t incoming)
397397
ntripServer->bytesSent = 0;
398398
}
399399

400-
if (ntripServer->networkClient->connected())
400+
if (ntripServer->networkClient && ntripServer->networkClient->connected())
401401
{
402402
ntripServer->networkClient->write(incoming); // Send this byte to socket
403403
ntripServer->bytesSent++;

0 commit comments

Comments
 (0)