From 995aa0fc8586113d98f4682db07099a78a822649 Mon Sep 17 00:00:00 2001 From: himself65 Date: Thu, 12 Mar 2020 23:48:01 +0800 Subject: [PATCH] src: Handle NULL env scenario --- src/module_wrap.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/module_wrap.cc b/src/module_wrap.cc index b2afefce17eb91..54b68cd3ab4afb 100644 --- a/src/module_wrap.cc +++ b/src/module_wrap.cc @@ -1529,7 +1529,8 @@ void ModuleWrap::SetImportModuleDynamicallyCallback( void ModuleWrap::HostInitializeImportMetaObjectCallback( Local context, Local module, Local meta) { Environment* env = Environment::GetCurrent(context); - CHECK_NOT_NULL(env); // TODO(addaleax): Handle nullptr here. + if (env == nullptr) + return; ModuleWrap* module_wrap = GetFromModule(env, module); if (module_wrap == nullptr) {