Fix double free when saving.

This commit is contained in:
Unknown W. Brackets committed 2013-12-08 14:46:05 -08:00
1 parent 9f8f023ff1
commit 2278bee910
1 file changed
+1 -1
+1 -1
View File
@@ -1086,7 +1086,7 @@ void SavedataParam::Clear()
{
for (int i = 0; i < saveNameListDataCount; i++)
{
if (saveDataList[i].texture != NULL)
if (saveDataList[i].texture != NULL && (!noSaveIcon || saveDataList[i].texture != noSaveIcon->texture))
delete saveDataList[i].texture;
saveDataList[i].texture = NULL;
}