mirror of
https://github.com/flightlessmango/MangoHud.git
synced 2024-11-18 03:25:40 +00:00
logging: return on empty vec
This commit is contained in:
parent
193fdc7eef
commit
df61c6602f
@ -66,6 +66,13 @@ static bool compareByFps(const logData &a, const logData &b)
|
|||||||
|
|
||||||
static void writeSummary(string filename){
|
static void writeSummary(string filename){
|
||||||
auto& logArray = logger->get_log_data();
|
auto& logArray = logger->get_log_data();
|
||||||
|
// if the log is stopped/started too fast we might end up with an empty vector.
|
||||||
|
// in that case, just bail.
|
||||||
|
if (logArray.size() == 0){
|
||||||
|
logger->stop_logging();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
filename = filename.substr(0, filename.size() - 4);
|
filename = filename.substr(0, filename.size() - 4);
|
||||||
filename += "_summary.csv";
|
filename += "_summary.csv";
|
||||||
SPDLOG_INFO("{}", filename);
|
SPDLOG_INFO("{}", filename);
|
||||||
|
Loading…
Reference in New Issue
Block a user