quartz: Fix NULL pointer dereference (Coverity).
This commit is contained in:
parent
a79868e09d
commit
5ea119a3d0
|
@ -591,9 +591,9 @@ HRESULT WINAPI MediaSeekingImpl_SetPositions(IMediaSeeking * iface, LONGLONG * p
|
||||||
This->llCurrent = llNewCurrent;
|
This->llCurrent = llNewCurrent;
|
||||||
This->llStop = llNewStop;
|
This->llStop = llNewStop;
|
||||||
|
|
||||||
if (dwCurrentFlags & AM_SEEKING_ReturnTime)
|
if (pCurrent && (dwCurrentFlags & AM_SEEKING_ReturnTime))
|
||||||
*pCurrent = llNewCurrent;
|
*pCurrent = llNewCurrent;
|
||||||
if (dwStopFlags & AM_SEEKING_ReturnTime)
|
if (pStop && (dwStopFlags & AM_SEEKING_ReturnTime))
|
||||||
*pStop = llNewStop;
|
*pStop = llNewStop;
|
||||||
|
|
||||||
ForwardCmdSeek(This->crst, This->pUserData, fwd_setposition, &args);
|
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(hr == S_OK, "GetCurrentPosition failed: %08x\n", hr);
|
||||||
ok(pos == 0, "Position != 0 (%x%08x)\n", (DWORD)(pos >> 32), (DWORD)pos);
|
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);
|
IMediaFilter_SetSyncSource(filter, NULL);
|
||||||
pos = 0xdeadbeef;
|
pos = 0xdeadbeef;
|
||||||
hr = IMediaSeeking_GetCurrentPosition(seeking, &pos);
|
hr = IMediaSeeking_GetCurrentPosition(seeking, &pos);
|
||||||
|
|
Loading…
Reference in New Issue