mstask: ITaskTrigger::GetTrigger() should fail on NULL input.

Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Dmitry Timoshkov 2018-05-14 15:49:20 +08:00 committed by Alexandre Julliard
parent fa4c707466
commit 999922f7f3
2 changed files with 5 additions and 0 deletions

View File

@ -211,6 +211,8 @@ static HRESULT WINAPI MSTASK_ITaskTrigger_GetTrigger(
TRACE("(%p, %p)\n", iface, pTrigger); TRACE("(%p, %p)\n", iface, pTrigger);
if (!pTrigger) return E_INVALIDARG;
/* Native implementation doesn't verify equivalent cbTriggerSize fields */ /* Native implementation doesn't verify equivalent cbTriggerSize fields */
/* Copy relevant fields of the structure */ /* Copy relevant fields of the structure */

View File

@ -139,6 +139,9 @@ static void test_SetTrigger_GetTrigger(void)
hres = ITaskTrigger_SetTrigger(test_trigger, NULL); hres = ITaskTrigger_SetTrigger(test_trigger, NULL);
ok(hres == E_INVALIDARG, "got %#x\n", hres); ok(hres == E_INVALIDARG, "got %#x\n", hres);
hres = ITaskTrigger_GetTrigger(test_trigger, NULL);
ok(hres == E_INVALIDARG, "got %#x\n", hres);
/* Setup a trigger with base values for this test run */ /* Setup a trigger with base values for this test run */
GetLocalTime(&time); GetLocalTime(&time);
empty_trigger_state.wStartHour = time.wHour; empty_trigger_state.wStartHour = time.wHour;