diff --git a/src/SFML/Window/Win32/WindowImplWin32.cpp b/src/SFML/Window/Win32/WindowImplWin32.cpp index e6f5668e6..a424843e2 100755 --- a/src/SFML/Window/Win32/WindowImplWin32.cpp +++ b/src/SFML/Window/Win32/WindowImplWin32.cpp @@ -430,8 +430,9 @@ void WindowImplWin32::setKeyRepeatEnabled(bool enabled) void WindowImplWin32::requestFocus() { // Allow focus stealing only within the same process; compare PIDs of current and foreground window - DWORD thisPid = GetWindowThreadProcessId(m_handle, NULL); - DWORD foregroundPid = GetWindowThreadProcessId(GetForegroundWindow(), NULL); + DWORD thisPid, foregroundPid; + GetWindowThreadProcessId(m_handle, &thisPid); + GetWindowThreadProcessId(GetForegroundWindow(), &foregroundPid); if (thisPid == foregroundPid) {