summaryrefslogtreecommitdiffhomepage
path: root/src/nodejs/unit-http/unit.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/nodejs/unit-http/unit.cpp')
-rw-r--r--src/nodejs/unit-http/unit.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nodejs/unit-http/unit.cpp b/src/nodejs/unit-http/unit.cpp
index 589eca3f..ee5dc46f 100644
--- a/src/nodejs/unit-http/unit.cpp
+++ b/src/nodejs/unit-http/unit.cpp
@@ -519,11 +519,11 @@ Unit::add_port(nxt_unit_ctx_t *ctx, nxt_unit_port_t *port)
void
-Unit::remove_port(nxt_unit_t *unit, nxt_unit_port_t *port)
+Unit::remove_port(nxt_unit_t *unit, nxt_unit_ctx_t *ctx, nxt_unit_port_t *port)
{
port_data_t *data;
- if (port->data != NULL) {
+ if (port->data != NULL && ctx != NULL) {
data = (port_data_t *) port->data;
data->stop();