Signed-off-by: Dmitry Timoshkov dmitry@baikal.ru --- dlls/mstask/task.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/dlls/mstask/task.c b/dlls/mstask/task.c index f93aff1ccb..986faa1654 100644 --- a/dlls/mstask/task.c +++ b/dlls/mstask/task.c @@ -1133,9 +1133,6 @@ static HRESULT write_triggers(ITask *task, HANDLE hfile) hr = ITask_GetTriggerCount(task, &count); if (hr != S_OK) return hr;
- if (!WriteFile(hfile, &count, sizeof(count), &size, NULL)) - return HRESULT_FROM_WIN32(GetLastError()); - /* Windows saves a .job with at least 1 trigger */ if (!count) { @@ -1146,6 +1143,9 @@ static HRESULT write_triggers(ITask *task, HANDLE hfile) count = 1; }
+ if (!WriteFile(hfile, &count, sizeof(count), &size, NULL)) + return HRESULT_FROM_WIN32(GetLastError()); + for (i = 0; i < count; i++) { TASK_TRIGGER task_trigger;