PerfProfiler: Avoid connection on nullptr process

Change-Id: I858a63e5a555c20f8b0a4a0eced1ec44e3e69a4e
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
This commit is contained in:
Christian Stenger
2019-03-21 15:22:52 +01:00
parent fc1f8cb464
commit c9fec22e1e

View File

@@ -159,6 +159,10 @@ void PerfConfigWidget::setTarget(ProjectExplorer::Target *target)
QTC_CHECK(!m_process || m_process->state() == QProcess::NotRunning);
m_process.reset(device->createProcess(nullptr));
if (!m_process) {
m_ui->useTracePointsButton->setEnabled(false);
return;
}
connect(m_process.get(), &ProjectExplorer::DeviceProcess::finished,
this, &PerfConfigWidget::handleProcessFinished);