prevent crash when nothing to broadcast in soundbrd app (#1807)

* prevent crash when nothing to broadcast in soundbrd app

* format
This commit is contained in:
sommermoregentraum 2024-01-23 12:15:37 +08:00 committed by GitHub
parent 6e74ad942f
commit 03b13f8ab0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -80,7 +80,13 @@ void SoundBoardView::file_error() {
}
void SoundBoardView::start_tx(const uint32_t id) {
if (file_list.empty()) {
file_error();
return;
}
auto reader = std::make_unique<WAVFileReader>();
uint32_t tone_key_index = options_tone_key.selected_index();
uint32_t sample_rate;