Skip to content

Commit

Permalink
Fix crash because "Stop Recording" could be pressed twice
Browse files Browse the repository at this point in the history
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).
  • Loading branch information
albertvaka authored Dec 18, 2024
1 parent 87a9c26 commit f24bae5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/recordpage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -649,6 +649,9 @@ void RecordPage::onStartRecordingButtonClicked(bool checked)
break;
}
} else {
m_updateRuntimeTimer->stop();
ui->startRecordingButton->setText(tr("Stopping recording..."));
ui->startRecordingButton->setEnabled(false);
stopRecording();
}
}
Expand Down

0 comments on commit f24bae5

Please sign in to comment.