quartz: Add check for NULL pointer in FileSource_Load.
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de> Signed-off-by: Andrew Eikum <aeikum@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
610d6b4540
commit
b28a8a3157
|
@ -613,6 +613,9 @@ static HRESULT WINAPI FileSource_Load(IFileSourceFilter * iface, LPCOLESTR pszFi
|
||||||
|
|
||||||
TRACE("(%s, %p)\n", debugstr_w(pszFileName), pmt);
|
TRACE("(%s, %p)\n", debugstr_w(pszFileName), pmt);
|
||||||
|
|
||||||
|
if (!pszFileName)
|
||||||
|
return E_POINTER;
|
||||||
|
|
||||||
/* open file */
|
/* open file */
|
||||||
/* FIXME: check the sharing values that native uses */
|
/* FIXME: check the sharing values that native uses */
|
||||||
hFile = CreateFileW(pszFileName, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_FLAG_OVERLAPPED, NULL);
|
hFile = CreateFileW(pszFileName, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_FLAG_OVERLAPPED, NULL);
|
||||||
|
|
|
@ -252,7 +252,6 @@ static void test_filesourcefilter(void)
|
||||||
ok(olepath == NULL, "expected NULL, got %p\n", olepath);
|
ok(olepath == NULL, "expected NULL, got %p\n", olepath);
|
||||||
|
|
||||||
hr = IFileSourceFilter_Load(filesource, NULL, NULL);
|
hr = IFileSourceFilter_Load(filesource, NULL, NULL);
|
||||||
todo_wine
|
|
||||||
ok(hr == E_POINTER, "expected E_POINTER, got %08x\n", hr);
|
ok(hr == E_POINTER, "expected E_POINTER, got %08x\n", hr);
|
||||||
|
|
||||||
hr = IFileSourceFilter_Load(filesource, path, NULL);
|
hr = IFileSourceFilter_Load(filesource, path, NULL);
|
||||||
|
|
Loading…
Reference in New Issue