NOISSUE fix a bug with mutexes on Windows, more warnings

This commit is contained in:
Petr Mrázek
2018-06-28 23:42:44 +02:00
parent 07f7ec8eef
commit bb599abf59
2 changed files with 3 additions and 1 deletions

View File

@ -66,7 +66,7 @@ Qt::HANDLE LockedFile::getMutexHandle(int idx, bool doCreate)
}
}
else {
OpenMutexW(SYNCHRONIZE | MUTEX_MODIFY_STATE, FALSE, (LPCWSTR)mname.utf16());
mutex = OpenMutexW(SYNCHRONIZE | MUTEX_MODIFY_STATE, FALSE, (LPCWSTR)mname.utf16());
if (!mutex) {
if (GetLastError() != ERROR_FILE_NOT_FOUND)
qErrnoWarning("QtLockedFile::lock(): OpenMutex failed");