[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
This commit is contained in:
ejurgensen 2024-06-22 17:34:04 +02:00
parent d6d46de399
commit 7ddb4e9bbb
1 changed files with 5 additions and 0 deletions

View File

@ -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