bfirsh / jsnes

A JavaScript NES emulator.
https://jsnes.org
Apache License 2.0
6.1k stars 823 forks source link

Fix mmap is null error in cpu.js #446

Open grimicron opened 1 year ago

grimicron commented 1 year ago

During the first few frames of the emulator, an error is caused in the emulate() and doNonMaskableInterrupt() because this.nes.mmap is null. I added some guard clauses to prevent this error from occurring.