GB Memory: Fix null deref when rumbling

This commit is contained in:
Jeffrey Pfau 2016-05-30 15:08:42 -07:00
parent 5a2c6d037d
commit 1d021a72c7
1 changed files with 1 additions and 1 deletions

View File

@ -721,7 +721,7 @@ void _GBMBC5(struct GBMemory* memory, uint16_t address, uint8_t value) {
break;
case 0x4:
case 0x5:
if (memory->mbcType == GB_MBC5_RUMBLE) {
if (memory->mbcType == GB_MBC5_RUMBLE && memory->rumble) {
memory->rumble->setRumble(memory->rumble, (value >> 3) & 1);
value &= ~8;
}