Skip to content

Commit

Permalink
src: Handle NULL env scenario
Browse files Browse the repository at this point in the history
  • Loading branch information
himself65 committed Mar 17, 2020
1 parent e458747 commit 995aa0f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/module_wrap.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1529,7 +1529,8 @@ void ModuleWrap::SetImportModuleDynamicallyCallback(
void ModuleWrap::HostInitializeImportMetaObjectCallback(
Local<Context> context, Local<Module> module, Local<Object> 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) {
Expand Down

0 comments on commit 995aa0f

Please sign in to comment.