Skip to content

Commit

Permalink
- print a message if saving the statistics file fails.
Browse files Browse the repository at this point in the history
  • Loading branch information
coelckers committed Mar 13, 2021
1 parent ae09ca7 commit fa0be28
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/gamedata/statistics.cpp
Expand Up @@ -248,7 +248,11 @@ static void SaveStatistics(const char *fn, TArray<FStatistics> &statlist)
unsigned int j;

FileWriter *fw = FileWriter::Open(fn);
if (fw == nullptr) return;
if (fw == nullptr)
{
Printf(PRINT_HIGH, "Unable to save statistics to %s\n", fn);
return;
}

qsort(&statlist[0], statlist.Size(), sizeof(statlist[0]), compare_episode_names);
for(unsigned i=0;i<statlist.Size ();i++)
Expand Down

0 comments on commit fa0be28

Please sign in to comment.