all repos — mgba @ 5ba2df1cd8e1d323a515ede29c42d2318b038a6c

mGBA Game Boy Advance Emulator

GB, GBA: Prevent loading null ROMs
Jeffrey Pfau jeffrey@endrift.com
Fri, 21 Oct 2016 19:09:16 -0700
commit

5ba2df1cd8e1d323a515ede29c42d2318b038a6c

parent

74390b4cfc06870f0d0d8e5cd2220ff4480daa81

3 files changed, 7 insertions(+), 0 deletions(-)

jump to
M CHANGESCHANGES

@@ -11,6 +11,7 @@ - Qt: Fix cut off tiles and alignment issues in tile viewer

- GBA Cheats: Fix GameShark ROM patches Misc: - PSP2: Improved controller rumble + - GB, GBA: Prevent loading null ROMs 0.5.1: (2016-10-05) Bugfixes:
M src/gb/gb.csrc/gb/gb.c

@@ -80,6 +80,9 @@ gb->stream = NULL;

} bool GBLoadROM(struct GB* gb, struct VFile* vf) { + if (!vf) { + return false; + } GBUnloadROM(gb); gb->romVf = vf; gb->pristineRomSize = vf->size(vf);
M src/gba/gba.csrc/gba/gba.c

@@ -484,6 +484,9 @@ return true;

} bool GBALoadROM(struct GBA* gba, struct VFile* vf) { + if (!vf) { + return false; + } GBAUnloadROM(gba); gba->romVf = vf; gba->pristineRomSize = vf->size(vf);