diff options
author | Michael Olbrich <m.olbrich@pengutronix.de> | 2018-07-09 14:52:08 +0200 |
---|---|---|
committer | Olivier CrĂȘte <olivier.crete@ocrete.ca> | 2018-10-21 08:17:30 +0000 |
commit | 2ef4bd7bc4bb148706f30c25be9f49e59a460653 (patch) | |
tree | 9393dcd6ae2efe86243a0096ce49fdfa0e271f2a /agent | |
parent | fd22f80b3608520573400c54f61928e85a385953 (diff) | |
download | libnice-2ef4bd7bc4bb148706f30c25be9f49e59a460653.tar.gz |
agent: fix crash with debugging enabled
For some connection types nicesock->fileno is never set.
Make sure it is not NULL before using it.
Diffstat (limited to 'agent')
-rw-r--r-- | agent/agent.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/agent/agent.c b/agent/agent.c index ddad077..db3067e 100644 --- a/agent/agent.c +++ b/agent/agent.c @@ -3889,7 +3889,7 @@ agent_recv_message_unlocked ( nice_address_to_string (message->from, tmpbuf); nice_debug_verbose ("%s: Agent %p : Packet received on local socket %p " "(fd %d) from [%s]:%u (%" G_GSSIZE_FORMAT " octets).", G_STRFUNC, agent, - nicesock, g_socket_get_fd (nicesock->fileno), tmpbuf, + nicesock, nicesock->fileno ? g_socket_get_fd (nicesock->fileno) : -1, tmpbuf, nice_address_get_port (message->from), message->length); } |