mirror of https://github.com/mgba-emu/mgba.git
GB, GBA: Prevent loading null ROMs
This commit is contained in:
parent
74390b4cfc
commit
5ba2df1cd8
1
CHANGES
1
CHANGES
|
@ -11,6 +11,7 @@ Bugfixes:
|
|||
- GBA Cheats: Fix GameShark ROM patches
|
||||
Misc:
|
||||
- PSP2: Improved controller rumble
|
||||
- GB, GBA: Prevent loading null ROMs
|
||||
|
||||
0.5.1: (2016-10-05)
|
||||
Bugfixes:
|
||||
|
|
|
@ -80,6 +80,9 @@ static void GBInit(void* cpu, struct mCPUComponent* component) {
|
|||
}
|
||||
|
||||
bool GBLoadROM(struct GB* gb, struct VFile* vf) {
|
||||
if (!vf) {
|
||||
return false;
|
||||
}
|
||||
GBUnloadROM(gb);
|
||||
gb->romVf = vf;
|
||||
gb->pristineRomSize = vf->size(vf);
|
||||
|
|
|
@ -484,6 +484,9 @@ bool GBALoadMB(struct GBA* gba, struct VFile* vf) {
|
|||
}
|
||||
|
||||
bool GBALoadROM(struct GBA* gba, struct VFile* vf) {
|
||||
if (!vf) {
|
||||
return false;
|
||||
}
|
||||
GBAUnloadROM(gba);
|
||||
gba->romVf = vf;
|
||||
gba->pristineRomSize = vf->size(vf);
|
||||
|
|
Loading…
Reference in New Issue