summaryrefslogtreecommitdiff
path: root/Source/Core/Common/Logging/LogManager.cpp
diff options
context:
space:
mode:
authorLéo Lam <leo@innovatetechnologi.es>2017-06-17 10:39:06 +0200
committerLéo Lam <leo@innovatetechnologi.es>2017-06-17 10:39:06 +0200
commitdd8dcdf880d81a599f478bb868a8e8a85d28e7fd (patch)
tree327a55b0293688128abe37f189e03375d319fd87 /Source/Core/Common/Logging/LogManager.cpp
parenta2ad3e14d0d3c33b746638f49ba5567a503ce16d (diff)
LogManager: Check if listener is valid before using it
Diffstat (limited to 'Source/Core/Common/Logging/LogManager.cpp')
-rw-r--r--Source/Core/Common/Logging/LogManager.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/Source/Core/Common/Logging/LogManager.cpp b/Source/Core/Common/Logging/LogManager.cpp
index 484151023d..2aef9318e7 100644
--- a/Source/Core/Common/Logging/LogManager.cpp
+++ b/Source/Core/Common/Logging/LogManager.cpp
@@ -164,7 +164,8 @@ void LogManager::LogWithFullPath(LogTypes::LOG_LEVELS level, LogTypes::LOG_TYPE
LogTypes::LOG_LEVEL_TO_CHAR[(int)level], log->GetShortName().c_str(), temp);
for (auto listener_id : *log)
- m_listeners[listener_id]->Log(level, msg.c_str());
+ if (m_listeners[listener_id])
+ m_listeners[listener_id]->Log(level, msg.c_str());
}
void LogManager::Init()