~aleteoryx/muditaos

e125c4af7caffe0b66e62e6f9fb46b66eddbb22b — Lefucjusz 1 year, 5 months ago 2224b00
[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;