sd: sap: fix crash with NULL category

Regression from fd84c2b48b

Fixes #28543
This commit is contained in:
Thomas Guillem 2024-02-27 09:29:36 +01:00 committed by Felix Paul Kühne
parent 5006690850
commit 79d2ab78ab
1 changed files with 1 additions and 1 deletions

View File

@ -285,7 +285,7 @@ static sap_announce_t *CreateAnnounce(services_discovery_t *p_sd,
/* backward compatibility with VLC 0.7.3-2.0.0 senders */
psz_value = vlc_sdp_attr_value(p_sdp, "x-plgroup");
}
input_item_t *cat = AddCategory(p_sd, psz_value);
input_item_t *cat = psz_value == NULL ? NULL : AddCategory(p_sd, psz_value);
free(str);
services_discovery_AddSubItem(p_sd, cat, p_input);