[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.
1 files changed, 4 insertions(+), 0 deletions(-) M module-audio/Audio/decoder/DecoderWAV.cpp
M module-audio/Audio/decoder/DecoderWAV.cpp => module-audio/Audio/decoder/DecoderWAV.cpp +4 -0
@@ 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;