Skip to content

Commit 7b4802a

Browse files
albertvakamilianw
authored andcommitted
Fix crash because "Stop Recording" could be pressed twice
Disable the stop button as soon as it is pressed instead of waiting to do it in the `recordingStopped` function, so it can't be pressed again which caused a crash. The `recordingStopped` function isn't immediately called after pressing stop because perf can take a while to finish after it is asked to terminate (eg: if debuginfod is enabled and has to download symbols, or if the trace is very big).
1 parent 87a9c26 commit 7b4802a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/recordpage.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -649,6 +649,9 @@ void RecordPage::onStartRecordingButtonClicked(bool checked)
649649
break;
650650
}
651651
} else {
652+
m_updateRuntimeTimer->stop();
653+
ui->startRecordingButton->setText(tr("Stopping recording..."));
654+
ui->startRecordingButton->setEnabled(false);
652655
stopRecording();
653656
}
654657
}

0 commit comments

Comments
 (0)