mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2025-08-11 16:37:37 +00:00
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:

committed by
GitHub

parent
6e74ad942f
commit
03b13f8ab0
@@ -80,7 +80,13 @@ void SoundBoardView::file_error() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void SoundBoardView::start_tx(const uint32_t id) {
|
void SoundBoardView::start_tx(const uint32_t id) {
|
||||||
|
if (file_list.empty()) {
|
||||||
|
file_error();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
auto reader = std::make_unique<WAVFileReader>();
|
auto reader = std::make_unique<WAVFileReader>();
|
||||||
|
|
||||||
uint32_t tone_key_index = options_tone_key.selected_index();
|
uint32_t tone_key_index = options_tone_key.selected_index();
|
||||||
uint32_t sample_rate;
|
uint32_t sample_rate;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user