Fix uninitialized variable in Crash.cpp

This commit is contained in:
sukibaby
2024-06-23 21:39:40 -07:00
committed by teejusb
parent 5d4f9dcb07
commit 5e3bc389c3
+6 -4
View File
@@ -187,8 +187,11 @@ static const char *CrashGetModuleBaseName(HMODULE hmod, char *pszBaseName)
void RunChild() void RunChild()
{ {
HANDLE hProcess, hToStdin, hFromStdout; HANDLE hProcess = nullptr, hToStdin = nullptr, hFromStdout = nullptr;
StartChild( hProcess, hToStdin, hFromStdout ); if (!StartChild(hProcess, hToStdin, hFromStdout))
{
ASSERT_M(0, "Failed to start child process");
}
// 0. Send a handle of this process to the crash handling process, which it // 0. Send a handle of this process to the crash handling process, which it
// can use to handle symbol lookups. // can use to handle symbol lookups.
@@ -200,7 +203,7 @@ void RunChild()
hProcess, hProcess,
&hTargetHandle, &hTargetHandle,
0, 0,
false, FALSE,
DUPLICATE_SAME_ACCESS DUPLICATE_SAME_ACCESS
); );
@@ -676,4 +679,3 @@ void CrashHandler::ForceCrash( const char *reason )
* OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE. * PERFORMANCE OF THIS SOFTWARE.
*/ */