aboutsummaryrefslogtreecommitdiff
path: root/src/core/socket.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/socket.c')
-rw-r--r--src/core/socket.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/core/socket.c b/src/core/socket.c
index 67b3f978..85b97363 100644
--- a/src/core/socket.c
+++ b/src/core/socket.c
@@ -141,6 +141,9 @@ nni_sock_pipe_remove(nni_sock *sock, nni_pipe *pipe)
{
void *pdata;
+ if (sock == NULL) {
+ return;
+ }
nni_mtx_lock(&sock->s_mx);
if (nni_list_active(&sock->s_pipes, pipe)) {
nni_list_remove(&sock->s_pipes, pipe);