mirror of
https://github.com/mudita/MuditaOS.git
synced 2026-07-19 04:24:05 -04:00
[BH-2019] Fix crash after deleting WAV alarm sound
Fix of the issue that the device would crash when entering alarm sound selection list after deleting selected file during alarm ringing, but only when file's format was WAV.
This commit is contained in:
@@ -15,6 +15,10 @@ namespace audio
|
||||
{
|
||||
DecoderWAV::DecoderWAV(const std::string &filePath) : Decoder(filePath), wav(std::make_unique<drwav>())
|
||||
{
|
||||
if (fileSize == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (drwav_init(wav.get(), drwavRead, drwavSeek, this, nullptr) == DRWAV_FALSE) {
|
||||
LOG_ERROR("Unable to init WAV decoder");
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user