1
0
Fork 0
mirror of synced 2025-03-07 03:53:26 +01:00

mf: Make session_get_node_object() more robust.

It's possible that a state object pointer not in the topology node collection gets passed to
session_get_node_object(). Instead of returning the last node when the object is not found, we
should return a NULL so that the state of the last node is not changed by mistake.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
This commit is contained in:
Zhiyi Zhang 2023-08-07 17:30:05 +08:00 committed by Alexandre Julliard
parent 06482e324c
commit a00b30bfbf

View file

@ -2851,10 +2851,10 @@ static struct topo_node *session_get_node_object(struct media_session *session,
LIST_FOR_EACH_ENTRY(node, &session->presentation.nodes, struct topo_node, entry)
{
if (node->type == node_type && object == node->object.object)
break;
return node;
}
return node;
return NULL;
}
static BOOL session_set_node_object_state(struct media_session *session, IUnknown *object,