Skip to content

Commit c52b1a7

Browse files
authored
Add check to prevent setting the same logger
1 parent 4ee30be commit c52b1a7

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

code/Common/Logger.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,9 @@ Logger *Logger::create() {
9090
}
9191

9292
void Logger::set(Logger *logger) {
93+
if (logger == sLogger) {
94+
return;
95+
}
9396
kill();
9497
sLogger = logger;
9598
}

0 commit comments

Comments
 (0)