localspl: Clear LastError on success in AddMonitor.

Signed-off-by: Detlef Riekenberg <wine.dev@web.de>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Detlef Riekenberg 2017-02-08 09:03:44 +00:00 committed by Alexandre Julliard
parent 98a0c3df2e
commit 54e52897f8
1 changed files with 2 additions and 0 deletions

View File

@ -1507,6 +1507,8 @@ static BOOL WINAPI fpAddMonitor(LPWSTR pName, DWORD Level, LPBYTE pMonitors)
}
monitor_unload(pm);
SetLastError(ERROR_SUCCESS); /* Monitor installer depends on this */
if (RegCreateKeyW(HKEY_LOCAL_MACHINE, monitorsW, &hroot) != ERROR_SUCCESS) {
ERR("unable to create key %s\n", debugstr_w(monitorsW));
return FALSE;