Core: Fix crash on reaper shutdown

Change-Id: I08dd990f851786f2af55076800d694855b859687
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
Orgad Shaneh
2016-11-12 22:58:14 +02:00
committed by Orgad Shaneh
parent 28c70724ee
commit 65bc23ba55

View File

@@ -69,7 +69,7 @@ bool ProcessReaper::isFinished() const
void ProcessReaper::nextIteration()
{
QProcess::ProcessState state = m_process->state();
QProcess::ProcessState state = m_process ? m_process->state() : QProcess::NotRunning;
if (state == QProcess::NotRunning || m_emergencyCounter > 5) {
delete m_process;
m_process = nullptr;