Add null check for executor

pull/20331/head
Yash Tibrewal 5 years ago
parent 7d365e610f
commit f7cced1e34
  1. 4
      src/core/lib/iomgr/executor.cc

@ -467,6 +467,10 @@ void Executor::ShutdownAll() {
bool Executor::IsThreaded(ExecutorType executor_type) {
GPR_ASSERT(executor_type < ExecutorType::NUM_EXECUTORS);
Executor* executor = executors[static_cast<size_t>(executor_type)];
if (executor == nullptr) {
return false;
}
return executors[static_cast<size_t>(executor_type)]->IsThreaded();
}

Loading…
Cancel
Save