Fix exception when statrting from saveram multple times

This commit is contained in:
alyosha-tas 2019-04-21 09:06:16 -04:00
parent 655729f29c
commit 1c9182a290
1 changed files with 8 additions and 2 deletions

View File

@ -93,11 +93,17 @@ namespace BizHawk.Client.Common
{
if (value)
{
Header.Add(HeaderKeys.STARTSFROMSAVERAM, "True");
if (!Header.ContainsKey(HeaderKeys.STARTSFROMSAVERAM))
{
Header.Add(HeaderKeys.STARTSFROMSAVERAM, "True");
}
}
else
{
Header.Remove(HeaderKeys.STARTSFROMSAVERAM);
if (Header.ContainsKey(HeaderKeys.STARTSFROMSAVERAM))
{
Header.Remove(HeaderKeys.STARTSFROMSAVERAM);
}
}
}
}