diff --git a/main/http.c b/main/http.c
index 7f1ffe0c57..80c00c52a1 100644
--- a/main/http.c
+++ b/main/http.c
@@ -396,10 +396,12 @@ static int httpstatus_callback(struct ast_tcptls_session_instance *ser,
ast_str_append(&out, 0, "
Server | %s |
\r\n", http_server_name);
ast_str_append(&out, 0, "Prefix | %s |
\r\n", prefix);
- ast_str_append(&out, 0, "Bind Address | %s |
\r\n",
- ast_sockaddr_stringify_addr(&global_http_server->args.old_address));
- ast_str_append(&out, 0, "Bind Port | %s |
\r\n",
- ast_sockaddr_stringify_port(&global_http_server->args.old_address));
+ if (global_http_server) {
+ ast_str_append(&out, 0, "Bind Address | %s |
\r\n",
+ ast_sockaddr_stringify_addr(&global_http_server->args.old_address));
+ ast_str_append(&out, 0, "Bind Port | %s |
\r\n",
+ ast_sockaddr_stringify_port(&global_http_server->args.old_address));
+ }
if (http_tls_cfg.enabled) {
ast_str_append(&out, 0, "SSL Bind Port | %s |
\r\n",
ast_sockaddr_stringify_port(&https_desc.old_address));