From 7ddb4e9bbbf2915a6b0f06159bd7c70b2c4c1d80 Mon Sep 17 00:00:00 2001 From: ejurgensen Date: Sat, 22 Jun 2024 17:34:04 +0200 Subject: [PATCH] [httpd] Fix startup crash after merge commit 4cbce79 With debug level loggint, the crash would be preceeded with "Checking if client '(null)' is a speaker" Resolves #1771 --- src/httpd.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/httpd.c b/src/httpd.c index c0c64c8a67..63a4463bc9 100644 --- a/src/httpd.c +++ b/src/httpd.c @@ -1201,6 +1201,11 @@ httpd_xcode_profile_get(struct httpd_request *hreq) struct player_speaker_info spk; int ret; + // No peer address if the function is called from httpd_daap.c when the DAAP + // cache is being updated + if (!hreq->peer_address) + return XCODE_NONE; + DPRINTF(E_DBG, L_HTTPD, "Checking if client '%s' is a speaker\n", hreq->peer_address); // A Roku Soundbridge may also be RCP device/speaker for which the user may