Signed-off-by: Dmitry Timoshkov dmitry@baikal.ru --- dlls/mstask/task_trigger.c | 2 ++ dlls/mstask/tests/task_trigger.c | 3 +++ 2 files changed, 5 insertions(+)
diff --git a/dlls/mstask/task_trigger.c b/dlls/mstask/task_trigger.c index 888fb66a4f..6d11817e00 100644 --- a/dlls/mstask/task_trigger.c +++ b/dlls/mstask/task_trigger.c @@ -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; diff --git a/dlls/mstask/tests/task_trigger.c b/dlls/mstask/tests/task_trigger.c index 3e2762079d..e22b2ae2dd 100644 --- a/dlls/mstask/tests/task_trigger.c +++ b/dlls/mstask/tests/task_trigger.c @@ -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;