mstask: ITaskTrigger::SetTrigger() 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:
parent
340bf9b513
commit
fa4c707466
|
@ -103,6 +103,8 @@ static HRESULT WINAPI MSTASK_ITaskTrigger_SetTrigger(
|
|||
|
||||
TRACE("(%p, %p)\n", iface, pTrigger);
|
||||
|
||||
if (!pTrigger) return E_INVALIDARG;
|
||||
|
||||
/* Verify valid structure size */
|
||||
if (pTrigger->cbTriggerSize != sizeof(*pTrigger))
|
||||
return E_INVALIDARG;
|
||||
|
|
|
@ -136,6 +136,9 @@ static void test_SetTrigger_GetTrigger(void)
|
|||
hres = ITask_CreateTrigger(test_task, &idx, &test_trigger);
|
||||
ok(hres == S_OK, "got %#x\n", hres);
|
||||
|
||||
hres = ITaskTrigger_SetTrigger(test_trigger, NULL);
|
||||
ok(hres == E_INVALIDARG, "got %#x\n", hres);
|
||||
|
||||
/* Setup a trigger with base values for this test run */
|
||||
GetLocalTime(&time);
|
||||
empty_trigger_state.wStartHour = time.wHour;
|
||||
|
|
Loading…
Reference in New Issue