From 6479f972dccaabb3afadb570583a4269e8a785e4 Mon Sep 17 00:00:00 2001 From: Tannin Date: Wed, 25 Feb 2015 18:38:01 +0100 Subject: tons of code cleanup and minor fixes to harden the code (mostly suggestions from static code analysis) --- src/helper.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/helper.cpp') diff --git a/src/helper.cpp b/src/helper.cpp index 4c22dbda..1f072bd9 100644 --- a/src/helper.cpp +++ b/src/helper.cpp @@ -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; } -- cgit v1.3.1