Commit 85f5fdfd authored by Vadim Troshchinskiy's avatar Vadim Troshchinskiy Committed by Mike Gabriel

Check if unixPath is NULL before accessing it; this fixes crashing of nxagent when TEST is enabled.

Fixes ArcticaProject/nx-libs#217. Closes ArcticaProject/nx-libs#218.
parent 3039a34c
...@@ -7255,7 +7255,7 @@ int ConnectToRemote(ChannelEndPoint &socketAddress) ...@@ -7255,7 +7255,7 @@ int ConnectToRemote(ChannelEndPoint &socketAddress)
ESET(reason); ESET(reason);
#ifdef TEST #ifdef TEST
if (unixPath[0] != '\0' ) if (unixPath && unixPath[0] != '\0' )
{ {
*logofs << "Loop: Connection to Unix socket file '" *logofs << "Loop: Connection to Unix socket file '"
<< unixPath << "' failed with error '" << unixPath << "' failed with error '"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment