summaryrefslogtreecommitdiff
path: root/src/helper.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/helper.cpp')
-rw-r--r--src/helper.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/helper.cpp b/src/helper.cpp
index bec5d51e..1f072bd9 100644
--- a/src/helper.cpp
+++ b/src/helper.cpp
@@ -40,7 +40,7 @@ static bool helperExec(LPCWSTR moDirectory, LPCWSTR commandLine)
execInfo.cbSize = sizeof(SHELLEXECUTEINFOW);
execInfo.fMask = SEE_MASK_NOCLOSEPROCESS;
- execInfo.hwnd = NULL;
+ execInfo.hwnd = nullptr;
execInfo.lpVerb = L"runas";
execInfo.lpFile = fileName;
execInfo.lpParameters = commandLine;
@@ -49,7 +49,7 @@ static bool helperExec(LPCWSTR moDirectory, LPCWSTR commandLine)
::ShellExecuteExW(&execInfo);
- if (::WaitForSingleObject(execInfo.hProcess, INFINITE) != WAIT_OBJECT_0) {
+ if ((execInfo.hProcess == 0) || (::WaitForSingleObject(execInfo.hProcess, INFINITE) != WAIT_OBJECT_0)) {
reportError(QObject::tr("helper failed"));
return false;
}