taskschd: Add a NULL check to ITaskFolder::GetFolders.

This commit is contained in:
Dmitry Timoshkov 2014-02-05 15:08:32 +09:00 committed by Alexandre Julliard
parent b3a79114e0
commit 9c7025f92f
2 changed files with 5 additions and 0 deletions

View File

@ -236,6 +236,8 @@ static HRESULT WINAPI TaskFolder_GetFolders(ITaskFolder *iface, LONG flags, ITas
TRACE("%p,%x,%p: stub\n", iface, flags, folders);
if (!folders) return E_POINTER;
if (flags)
FIXME("unsupported flags %x\n", flags);

View File

@ -453,6 +453,9 @@ static void test_FolderCollection(void)
hr = ITaskFolder_GetFolder(root, Wine, &folder);
ok(hr == S_OK, "GetFolder error %#x\n", hr);
hr = ITaskFolder_GetFolders(folder, 0, NULL);
ok (hr == E_POINTER, "expected E_POINTER, got %#x\n", hr);
hr = ITaskFolder_GetFolders(folder, 0, &folders);
ok(hr == S_OK, "GetFolders error %#x\n", hr);