diff --git a/src/add-ons/kernel/network/stack/net_socket.cpp b/src/add-ons/kernel/network/stack/net_socket.cpp index 02751a7229..0a4739a330 100644 --- a/src/add-ons/kernel/network/stack/net_socket.cpp +++ b/src/add-ons/kernel/network/stack/net_socket.cpp @@ -732,7 +732,7 @@ socket_connected(net_socket* _socket) net_socket_private* socket = (net_socket_private*)_socket; WeakReference parent = socket->parent; - if (parent == NULL) + if (socket->parent == NULL) return B_BAD_VALUE; MutexLocker _(parent->lock); @@ -758,7 +758,7 @@ socket_aborted(net_socket* _socket) net_socket_private* socket = (net_socket_private*)_socket; WeakReference parent = socket->parent; - if (parent == NULL) + if (socket->parent == NULL) return B_BAD_VALUE; MutexLocker _(parent->lock);