mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-06 13:30:01 -05:00
avoid following NULL pointers
This commit is contained in:
parent
a898f21c87
commit
a19bab4b16
5 changed files with 25 additions and 20 deletions
|
|
@ -430,8 +430,8 @@ static int rescan_endpoint(struct impl *impl, struct endpoint *ep)
|
|||
|
||||
if ((obj = sm_media_session_find_object(impl->session, path_id)) != NULL) {
|
||||
if (strcmp(obj->type, PW_TYPE_INTERFACE_Endpoint) == 0) {
|
||||
peer = sm_object_get_data(obj, SESSION_KEY);
|
||||
goto do_link;
|
||||
if ((peer = sm_object_get_data(obj, SESSION_KEY)) != NULL)
|
||||
goto do_link;
|
||||
}
|
||||
else if (strcmp(obj->type, PW_TYPE_INTERFACE_Node) == 0) {
|
||||
node = (struct sm_node*)obj;
|
||||
|
|
|
|||
|
|
@ -490,7 +490,8 @@ static void object_update(void *data)
|
|||
node->obj->obj.avail & SM_OBJECT_CHANGE_MASK_PROPERTIES)
|
||||
node->endpoint = create_endpoint(node);
|
||||
|
||||
if (node->obj->obj.changed & SM_NODE_CHANGE_MASK_PARAMS)
|
||||
if (node->endpoint &&
|
||||
node->obj->obj.changed & SM_NODE_CHANGE_MASK_PARAMS)
|
||||
update_params(node->endpoint);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue