From cac7972837193203d3d33b400fbb0e8d76f76c08 Mon Sep 17 00:00:00 2001 From: Nikita Mikhaylov Date: Wed, 31 Jul 2019 17:18:59 +0300 Subject: [PATCH] better --- dbms/src/Interpreters/Context.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/dbms/src/Interpreters/Context.cpp b/dbms/src/Interpreters/Context.cpp index db32c29434f..e06f1cddfaa 100644 --- a/dbms/src/Interpreters/Context.cpp +++ b/dbms/src/Interpreters/Context.cpp @@ -1707,11 +1707,10 @@ std::shared_ptr Context::getTextLog() { auto lock = getLock(); - if (!shared->system_logs) { - if (auto log = shared->system_logs->text_log.lock()) { + if (!shared->system_logs) + if (auto log = shared->system_logs->text_log.lock()) return log; - } - } + return {}; }