summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_upstream.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/nxt_upstream.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/nxt_upstream.c b/src/nxt_upstream.c
index 9f81b286..de9b1d49 100644
--- a/src/nxt_upstream.c
+++ b/src/nxt_upstream.c
@@ -78,6 +78,10 @@ nxt_upstream_find(nxt_upstreams_t *upstreams, nxt_str_t *name,
uint32_t i, n;
nxt_upstream_t *upstream;
+ if (upstreams == NULL) {
+ return NXT_DECLINED;
+ }
+
upstream = &upstreams->upstream[0];
n = upstreams->items;