Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Do not dispatch logs when the process is terminating
  • Loading branch information
Kangz committed Apr 9, 2015
1 parent fd9a63e commit 01fb67b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/engine/framework/LogSystem.cpp
Expand Up @@ -43,6 +43,10 @@ namespace Log {
static std::vector<Log::Event> buffers[MAX_TARGET_ID];
static std::recursive_mutex bufferLocks[MAX_TARGET_ID];

if (Sys::IsProcessTerminating()) {
return;
}

for (int i = 0; i < MAX_TARGET_ID; i++) {
if ((targetControl >> i) & 1) {
std::lock_guard<std::recursive_mutex> guard(bufferLocks[i]);
Expand Down

0 comments on commit 01fb67b

Please sign in to comment.