diff --git a/src/audio.cpp b/src/audio.cpp index 3cc7b58..4b19ec7 100644 --- a/src/audio.cpp +++ b/src/audio.cpp @@ -66,12 +66,13 @@ void APU::initializeReadWriteHandlers() if (!mMap) { throw std::runtime_error("MemoryMap not set in APU"); + return; } - else - { - mMap->setAudioReadHandler([this](Word address) { return this->readByte(address); }); - mMap->setAudioWriteHandler([this](Word address, Byte value) { this->writeByte(address, value); }); - } + + mMap->setAudioReadHandler([this](Word address) + { return this->readByte(address); }); + mMap->setAudioWriteHandler([this](Word address, Byte value) + { this->writeByte(address, value); }); } void APU::test() {