It is actually importatnt that smInstance get cleared. The subsequent new Logger will check for it.

This commit is contained in:
Isaac Connor 2021-02-27 12:28:01 -05:00
parent 57585e4986
commit 3e9a2f2651
1 changed files with 1 additions and 0 deletions

View File

@ -559,6 +559,7 @@ void Logger::logPrint(bool hex, const char * const filepath, const int line, con
void logInit(const char *name, const Logger::Options &options) { void logInit(const char *name, const Logger::Options &options) {
if (Logger::smInstance) { if (Logger::smInstance) {
delete Logger::smInstance; delete Logger::smInstance;
Logger::smInstance = nullptr;
} }
Logger::smInstance = new Logger(); Logger::smInstance = new Logger();