mirror of https://github.com/mgba-emu/mgba.git
GB Memory: Fix null deref when rumbling
This commit is contained in:
parent
5a2c6d037d
commit
1d021a72c7
|
@ -721,7 +721,7 @@ void _GBMBC5(struct GBMemory* memory, uint16_t address, uint8_t value) {
|
||||||
break;
|
break;
|
||||||
case 0x4:
|
case 0x4:
|
||||||
case 0x5:
|
case 0x5:
|
||||||
if (memory->mbcType == GB_MBC5_RUMBLE) {
|
if (memory->mbcType == GB_MBC5_RUMBLE && memory->rumble) {
|
||||||
memory->rumble->setRumble(memory->rumble, (value >> 3) & 1);
|
memory->rumble->setRumble(memory->rumble, (value >> 3) & 1);
|
||||||
value &= ~8;
|
value &= ~8;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue