diff --git a/src/AudioDecoder.cpp b/src/AudioDecoder.cpp index 5c50a6c..a33173e 100644 --- a/src/AudioDecoder.cpp +++ b/src/AudioDecoder.cpp @@ -118,7 +118,12 @@ std::string NyquistIO::ParsePathForExtension(const std::string & path) const std::shared_ptr NyquistIO::GetDecoderForExtension(const std::string ext) { - return decoderTable[ext]; + if (decoderTable.size()) + { + return decoderTable[ext]; + } + else throw std::runtime_error("No available decoders."); + return nullptr; } void NyquistIO::BuildDecoderTable()