From fa0be28af1f08d1ba32dda783f80492577e70a81 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sat, 13 Mar 2021 12:21:35 +0100 Subject: [PATCH] - print a message if saving the statistics file fails. --- src/gamedata/statistics.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/gamedata/statistics.cpp b/src/gamedata/statistics.cpp index 21193856d..2258a2565 100644 --- a/src/gamedata/statistics.cpp +++ b/src/gamedata/statistics.cpp @@ -248,7 +248,11 @@ static void SaveStatistics(const char *fn, TArray &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