taskschd/tests: Avoid a crash in a test after E_ACCESSDENIED.

Signed-off-by: Detlef Riekenberg <wine.dev@web.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Detlef Riekenberg 2019-04-16 19:42:47 +02:00 committed by Alexandre Julliard
parent bc1b56ad18
commit c8b9aa00c6
1 changed files with 6 additions and 0 deletions

View File

@ -946,6 +946,11 @@ todo_wine
ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND) || hr == S_OK /* win7 */, "expected ERROR_FILE_NOT_FOUND, got %#x\n", hr);
hr = ITaskFolder_RegisterTask(root, NULL, xmlW, TASK_CREATE, v_null, v_null, TASK_LOGON_NONE, v_null, &task1);
if(hr == E_ACCESSDENIED)
{
skip("Access denied\n");
goto no_access;
}
ok(hr == S_OK, "RegisterTask error %#x\n", hr);
hr = IRegisteredTask_get_Name(task1, &bstr);
@ -962,6 +967,7 @@ todo_wine
hr = ITaskFolder_RegisterTask(folder, NULL, xmlW, TASK_CREATE, v_null, v_null, TASK_LOGON_NONE, v_null, &task1);
ok(hr == E_INVALIDARG, "expected E_INVALIDARG, got %#x\n", hr);
no_access:
ITaskFolder_Release(folder);
hr = ITaskFolder_DeleteFolder(root, Wine, 0);