From: Zhiyi Zhang zzhang@codeweavers.com
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. --- dlls/mf/session.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/dlls/mf/session.c b/dlls/mf/session.c index b5b631fb00a..c7516824fe7 100644 --- a/dlls/mf/session.c +++ b/dlls/mf/session.c @@ -2851,10 +2851,11 @@ 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; + WARN("Failed to find object %p.\n", object); + return NULL; }
static BOOL session_set_node_object_state(struct media_session *session, IUnknown *object,