show slightly informative message if mainform tries to load saveram for a game that has none

This commit is contained in:
goyuken 2014-02-06 22:08:01 +00:00
parent 8eb4044a5f
commit 099ae2484f
1 changed files with 7 additions and 1 deletions

View File

@ -1100,7 +1100,13 @@ namespace BizHawk.Client.EmuHawk
}
else
{
sram = new byte[Global.Emulator.ReadSaveRam().Length];
var oldram = Global.Emulator.ReadSaveRam();
if (oldram == null)
{
MessageBox.Show("Error: tried to load saveram, but core would not accept it?");
return;
}
sram = new byte[oldram.Length];
using (var reader = new BinaryReader(
new FileStream(PathManager.SaveRamPath(Global.Game), FileMode.Open, FileAccess.Read)))
{