Commit a00b30bf authored by Zhiyi Zhang's avatar Zhiyi Zhang Committed by Alexandre Julliard

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: 's avatarZhiyi Zhang <zzhang@codeweavers.com>
parent 06482e32
......@@ -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,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment