Improve logging in G_impl.

This commit is contained in:
levlam 2021-09-14 11:54:54 +03:00
parent 55ad2e5f86
commit d9a0168bfa

View File

@ -487,8 +487,7 @@ class Global final : public ActorContext {
inline Global *G_impl(const char *file, int line) {
ActorContext *context = Scheduler::context();
CHECK(context);
LOG_CHECK(context->get_id() == Global::ID) << "In " << file << " at " << line;
LOG_CHECK(context != nullptr && context->get_id() == Global::ID) << "In " << file << " at " << line;
return static_cast<Global *>(context);
}