Skip to content

Commit e15af07

Browse files
committed
Check context existing before use
1 parent 38e89f4 commit e15af07

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Storages/IStorageCluster.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ void IStorageCluster::read(
381381
auto this_ptr = std::static_pointer_cast<IStorageCluster>(shared_from_this());
382382

383383
std::optional<Tables> external_tables = std::nullopt;
384-
if (send_external_tables)
384+
if (send_external_tables && query_info.planner_context && query_info.planner_context->getMutableQueryContext())
385385
external_tables = query_info.planner_context->getMutableQueryContext()->getExternalTables();
386386

387387
auto reading = std::make_unique<ReadFromCluster>(

0 commit comments

Comments
 (0)