log: don't try to get the channel of a non-existing logger

Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: Ic08043dac01b682184ff440b2f7d7f4f3df9522e
pull/2882/head
Miklos Vajna 2021-07-14 17:27:54 +02:00
parent 72076ff8cb
commit f569c2b496
2 changed files with 5 additions and 0 deletions

View File

@ -382,6 +382,11 @@ namespace Log
void setThreadLocalLogLevel(const std::string& logLevel)
{
if (!Static.getLogger())
{
return;
}
// Use the same channel for all Poco loggers.
auto channel = Static.getLogger()->getChannel();