msi: The szLogFile parameter of MsiEnableLogW is optional, so handle the case of it being NULL.
This commit is contained in:
parent
5700fe8a61
commit
c0596e0ae9
|
@ -632,6 +632,8 @@ UINT WINAPI MsiEnableLogW(DWORD dwLogMode, LPCWSTR szLogFile, DWORD attributes)
|
|||
|
||||
TRACE("%08lx %s %08lx\n", dwLogMode, debugstr_w(szLogFile), attributes);
|
||||
|
||||
if (szLogFile)
|
||||
{
|
||||
lstrcpyW(gszLogFile,szLogFile);
|
||||
if (!(attributes & INSTALLLOGATTRIBUTES_APPEND))
|
||||
DeleteFileW(szLogFile);
|
||||
|
@ -641,6 +643,9 @@ UINT WINAPI MsiEnableLogW(DWORD dwLogMode, LPCWSTR szLogFile, DWORD attributes)
|
|||
CloseHandle(file);
|
||||
else
|
||||
ERR("Unable to enable log %s\n",debugstr_w(szLogFile));
|
||||
}
|
||||
else
|
||||
gszLogFile[0] = '\0';
|
||||
|
||||
return ERROR_SUCCESS;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue