Win32 - Fix debug window so it doesn't crash if unminimized with no game loaded.
This commit is contained in:
parent
19b5cf13f5
commit
c400aaab01
|
@ -1,3 +1,4 @@
|
|||
17-nov-2009 - adelikat - Win32 - Fix debug window so it doesn't crash if unminimized with no game loaded.
|
||||
13-nov-2009 - mart0258 - Win32 - TASEdit - Added interface functionality (save/load, running TASEdit mid-movie, etc.)
|
||||
13-nov-2009 - adelikat - made savestate compression togglable
|
||||
13-nov-2009 - adelikat - made savestate backups togglable
|
||||
|
|
|
@ -243,7 +243,8 @@ uint8 GetMem(uint16 A) {
|
|||
}
|
||||
}
|
||||
else if ((A >= 0x4000) && (A < 0x6000)) return 0xFF; //fix me
|
||||
return ARead[A](A);
|
||||
if (GameInfo) return ARead[A](A); //adelikat: 11/17/09: Prevent crash if this is called with no game loaded.
|
||||
else return 0;
|
||||
}
|
||||
|
||||
uint8 GetPPUMem(uint8 A) {
|
||||
|
|
|
@ -106,7 +106,7 @@ int getBank(int offs)
|
|||
//GetNesFileAddress doesn't work well with Unif files
|
||||
int addr = GetNesFileAddress(offs)-16;
|
||||
|
||||
if (GameInfo->type==GIT_NSF) {
|
||||
if (GameInfo && GameInfo->type==GIT_NSF) {
|
||||
return addr != -1 ? addr / 0x1000 : -1;
|
||||
}
|
||||
return addr != -1 ? addr / 0x4000 : -1;
|
||||
|
|
Binary file not shown.
Loading…
Reference in New Issue