From 7275caf5bb3f0f555bbf2155c61822d5f6cdb0de Mon Sep 17 00:00:00 2001 From: Alexander Tokmakov Date: Tue, 19 Mar 2024 22:40:00 +0100 Subject: [PATCH] Update Context.cpp --- src/Interpreters/Context.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Interpreters/Context.cpp b/src/Interpreters/Context.cpp index f388cf6b3de..b3f16a9ba52 100644 --- a/src/Interpreters/Context.cpp +++ b/src/Interpreters/Context.cpp @@ -566,7 +566,8 @@ struct ContextSharedPart : boost::noncopyable std::lock_guard lock(mutex); delete_async_insert_queue = std::move(async_insert_queue); } - delete_async_insert_queue->flushAndShutdown(); + if (delete_async_insert_queue) + delete_async_insert_queue->flushAndShutdown(); /// Stop periodic reloading of the configuration files. /// This must be done first because otherwise the reloading may pass a changed config