Skip to content

Commit

Permalink
don't know why this happens in psi and not my standalone tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Justin Karneges committed Aug 1, 2012
1 parent f93a70b commit 96bfd2f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/activeprofiles_win.cpp
Expand Up @@ -299,7 +299,13 @@ bool ActiveProfiles::isActive(const QString &profile) const
return true;
}
else {
if (GetLastError() == ERROR_FILE_NOT_FOUND)
DWORD e = GetLastError();

// strangely it seems possible for OpenMutex to return NULL and
// yet GetLastError returns ERROR_SUCCESS (seen with
// Windows 7 + MinGW 64). we'll assume this to mean "not
// found"
if (e == ERROR_FILE_NOT_FOUND || e == ERROR_SUCCESS)
return false;
else // any other error means active
return true;
Expand Down

0 comments on commit 96bfd2f

Please sign in to comment.