GB MBC: Fix crash with NT Old 2 if rumble callback isn't installed

This commit is contained in:
Vicki Pfau 2023-03-22 01:47:30 -07:00
parent e79ae2860b
commit a064306916
1 changed files with 1 additions and 1 deletions

View File

@ -227,7 +227,7 @@ void _GBNTOld2(struct GB* gb, uint16_t address, uint8_t value) {
mbcState->rumble = !!(value & 0x80);
}
if (mbcState->rumble) {
if (mbcState->rumble && memory->rumble) {
memory->rumble->setRumble(memory->rumble, !!(mbcState->swapped ? value & 0x08 : value & 0x02));
}
break;