diff --git a/Core/Dialog/SavedataParam.cpp b/Core/Dialog/SavedataParam.cpp index e96fbbc0aa..c4f0420870 100644 --- a/Core/Dialog/SavedataParam.cpp +++ b/Core/Dialog/SavedataParam.cpp @@ -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"); }