forked from qt-creator/qt-creator
PerfProfiler: Avoid connection on nullptr process
Change-Id: I858a63e5a555c20f8b0a4a0eced1ec44e3e69a4e Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user