all repos — mgba @ 2a6ff14a3b646492ca371c76ed715aba0a4c2647

mGBA Game Boy Advance Emulator

GBA: Fix crash if no components are defined
Jeffrey Pfau jeffrey@endrift.com
Thu, 05 Mar 2015 21:43:29 -0800
commit

2a6ff14a3b646492ca371c76ed715aba0a4c2647

parent

6835ac8a81288301ddc852b20d6d9c3e93969df6

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

jump to
M src/gba/gba.csrc/gba/gba.c

@@ -716,7 +716,7 @@ if (gba->rr) {

gba->rr->nextFrame(gba->rr); } - if (gba->cpu->components[GBA_COMPONENT_CHEAT_DEVICE]) { + if (gba->cpu->components && gba->cpu->components[GBA_COMPONENT_CHEAT_DEVICE]) { struct GBACheatDevice* device = (struct GBACheatDevice*) gba->cpu->components[GBA_COMPONENT_CHEAT_DEVICE]; size_t i; for (i = 0; i < GBACheatSetsSize(&device->cheats); ++i) {