Don't allocate a 0 array in savedata savestates.

This commit is contained in:
Unknown W. Brackets 2013-02-04 00:34:37 -08:00
parent 07a5dca98e
commit 7a0c1f822d

View File

@ -1178,9 +1178,16 @@ void SavedataParam::DoState(PointerWrap &p)
{
if (saveDataList != NULL)
delete [] saveDataList;
saveDataList = new SaveFileInfo[saveDataListCount];
if (saveDataListCount != 0)
{
saveDataList = new SaveFileInfo[saveDataListCount];
p.DoArray(saveDataList, saveDataListCount);
}
else
saveDataList = NULL;
}
p.DoArray(saveDataList, saveDataListCount);
else
p.DoArray(saveDataList, saveDataListCount);
p.DoMarker("SavedataParam");
}