[NDS] Don't try to check for null in an out of range array (#2979)
I have no idea wtf I was thinking with this
This commit is contained in:
parent
bc9331cb6f
commit
d3bebefcbc
|
@ -38,6 +38,7 @@ namespace BizHawk.Emulation.Cores.Consoles.Nintendo.NDS
|
||||||
}
|
}
|
||||||
|
|
||||||
bool gbacartpresent = roms.Count > 1;
|
bool gbacartpresent = roms.Count > 1;
|
||||||
|
bool gbasrampresent = roms.Count == 3;
|
||||||
|
|
||||||
_tracecb = MakeTrace;
|
_tracecb = MakeTrace;
|
||||||
|
|
||||||
|
@ -96,7 +97,7 @@ namespace BizHawk.Emulation.Cores.Consoles.Nintendo.NDS
|
||||||
if (gbacartpresent)
|
if (gbacartpresent)
|
||||||
{
|
{
|
||||||
_exe.AddReadonlyFile(roms[1], "gba.rom");
|
_exe.AddReadonlyFile(roms[1], "gba.rom");
|
||||||
if (roms[2] != null)
|
if (gbasrampresent)
|
||||||
{
|
{
|
||||||
_exe.AddReadonlyFile(roms[2], "gba.ram");
|
_exe.AddReadonlyFile(roms[2], "gba.ram");
|
||||||
}
|
}
|
||||||
|
@ -135,7 +136,7 @@ namespace BizHawk.Emulation.Cores.Consoles.Nintendo.NDS
|
||||||
if (gbacartpresent)
|
if (gbacartpresent)
|
||||||
{
|
{
|
||||||
_exe.RemoveReadonlyFile("gba.rom");
|
_exe.RemoveReadonlyFile("gba.rom");
|
||||||
if (roms[2] != null)
|
if (gbasrampresent)
|
||||||
{
|
{
|
||||||
_exe.RemoveReadonlyFile("gba.ram");
|
_exe.RemoveReadonlyFile("gba.ram");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue