diff --git a/module-audio/Audio/decoder/DecoderWAV.cpp b/module-audio/Audio/decoder/DecoderWAV.cpp index 0dc09cd9a..3414f9bb1 100644 --- a/module-audio/Audio/decoder/DecoderWAV.cpp +++ b/module-audio/Audio/decoder/DecoderWAV.cpp @@ -15,6 +15,10 @@ namespace audio { DecoderWAV::DecoderWAV(const std::string &filePath) : Decoder(filePath), wav(std::make_unique()) { + if (fileSize == 0) { + return; + } + if (drwav_init(wav.get(), drwavRead, drwavSeek, this, nullptr) == DRWAV_FALSE) { LOG_ERROR("Unable to init WAV decoder"); return;