mfplay: Prevent usage of uninitialized pointer in error case (Coverity).

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Fabian Maurer 2022-04-27 14:44:40 +03:00 committed by Alexandre Julliard
parent b67d66f583
commit 312e0d518f
1 changed files with 2 additions and 1 deletions

View File

@ -1378,7 +1378,6 @@ static HRESULT media_item_create_sink_node(IUnknown *sink, IMFTopologyNode **nod
static HRESULT media_item_create_topology(struct media_player *player, struct media_item *item, IMFTopology **out)
{
IMFTopologyNode *src_node, *sink_node;
BOOL selected, video_added = FALSE;
IMFStreamDescriptor *sd;
IMFTopology *topology;
@ -1421,6 +1420,8 @@ static HRESULT media_item_create_topology(struct media_player *player, struct me
if (sink)
{
IMFTopologyNode *src_node = NULL, *sink_node = NULL;
hr = media_item_create_source_node(item, sd, &src_node);
if (SUCCEEDED(hr))
hr = media_item_create_sink_node(sink, &sink_node);