quartz: Properly handle input parameters in FileSource_GetCurFile.

This commit is contained in:
Chris Robinson 2007-02-13 14:28:02 -08:00 committed by Alexandre Julliard
parent b90a665d20
commit 0885141c64
1 changed files with 8 additions and 4 deletions

View File

@ -637,6 +637,9 @@ static HRESULT WINAPI FileSource_GetCurFile(IFileSourceFilter * iface, LPOLESTR
TRACE("(%p, %p)\n", ppszFileName, pmt);
if (!ppszFileName)
return E_POINTER;
/* copy file name & media type if available, otherwise clear the outputs */
if (This->pszFileName)
{
@ -646,12 +649,13 @@ static HRESULT WINAPI FileSource_GetCurFile(IFileSourceFilter * iface, LPOLESTR
else
*ppszFileName = NULL;
if (This->pmt)
if (pmt)
{
CopyMediaType(pmt, This->pmt);
if (This->pmt)
CopyMediaType(pmt, This->pmt);
else
ZeroMemory(pmt, sizeof(*pmt));
}
else
ZeroMemory(pmt, sizeof(*pmt));
return S_OK;
}