media-session: avoid some segfaults

This commit is contained in:
Wim Taymans 2020-01-16 16:19:09 +01:00
parent ae51b0acf1
commit 6af00219e1
2 changed files with 6 additions and 0 deletions

View file

@ -448,6 +448,8 @@ static int rescan_node(struct impl *impl, struct node *n)
if ((obj = sm_media_session_find_object(impl->session, path_id)) != NULL) {
if (strcmp(obj->type, PW_TYPE_INTERFACE_Node) == 0) {
peer = sm_object_get_data(obj, SESSION_KEY);
if (peer == NULL)
return -ENOENT;
goto do_link;
}
}