Commit 97d7d321 authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

amstream: Release the previous ddraw in ddraw_IAMMediaStream_Initialize().

parent e6cc4ae4
......@@ -324,6 +324,10 @@ static HRESULT WINAPI ddraw_IAMMediaStream_Initialize(IAMMediaStream *iface, IUn
stream->purpose_id = *purpose_id;
stream->stream_type = stream_type;
if (stream->ddraw)
IDirectDraw_Release(stream->ddraw);
stream->ddraw = NULL;
if (source_object
&& FAILED(hr = IUnknown_QueryInterface(source_object, &IID_IDirectDraw, (void **)&stream->ddraw)))
FIXME("Stream object doesn't implement IDirectDraw interface, hr %#lx.\n", hr);
......
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