all repos — mgba @ 1d021a72c7a1245adeceecd706dbebfb739f6247

mGBA Game Boy Advance Emulator

GB Memory: Fix null deref when rumbling
Jeffrey Pfau jeffrey@endrift.com
Mon, 30 May 2016 15:08:42 -0700
commit

1d021a72c7a1245adeceecd706dbebfb739f6247

parent

5a2c6d037dcb0d77d96780ced908c733411ee30d

1 files changed, 1 insertions(+), 1 deletions(-)

jump to
M src/gb/memory.csrc/gb/memory.c

@@ -721,7 +721,7 @@ _switchBank(memory, bank);

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; }