Commit 5ea119a3 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

quartz: Fix NULL pointer dereference (Coverity).

parent a79868e0
......@@ -591,9 +591,9 @@ HRESULT WINAPI MediaSeekingImpl_SetPositions(IMediaSeeking * iface, LONGLONG * p
This->llCurrent = llNewCurrent;
This->llStop = llNewStop;
if (dwCurrentFlags & AM_SEEKING_ReturnTime)
if (pCurrent && (dwCurrentFlags & AM_SEEKING_ReturnTime))
*pCurrent = llNewCurrent;
if (dwStopFlags & AM_SEEKING_ReturnTime)
if (pStop && (dwStopFlags & AM_SEEKING_ReturnTime))
*pStop = llNewStop;
ForwardCmdSeek(This->crst, This->pUserData, fwd_setposition, &args);
......
......@@ -272,6 +272,11 @@ static void test_mediacontrol(void)
ok(hr == S_OK, "GetCurrentPosition failed: %08x\n", hr);
ok(pos == 0, "Position != 0 (%x%08x)\n", (DWORD)(pos >> 32), (DWORD)pos);
hr = IMediaSeeking_SetPositions(seeking, NULL, AM_SEEKING_ReturnTime, NULL, AM_SEEKING_NoPositioning);
ok(hr == S_OK, "SetPositions failed: %08x\n", hr);
hr = IMediaSeeking_SetPositions(seeking, NULL, AM_SEEKING_NoPositioning, NULL, AM_SEEKING_ReturnTime);
ok(hr == S_OK, "SetPositions failed: %08x\n", hr);
IMediaFilter_SetSyncSource(filter, NULL);
pos = 0xdeadbeef;
hr = IMediaSeeking_GetCurrentPosition(seeking, &pos);
......
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