★ wanayoo — archive 1999 https://github.com/nodejs/node/commit/1476182670Nouvelle recherche | Portail wanayoo
Skip to content
Permalink
Browse files
src: handle NULL env scenario
PR-URL: #32230
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matheus Marchini <mat@mmarchini.me>
  • Loading branch information
Himself65 authored and MylesBorins committed Mar 24, 2020
1 parent 71a2fa2 commit 14761826707c0d87a2038f2b4a877ee33684d153
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/module_wrap.cc
@@ -572,7 +572,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) {

0 comments on commit 1476182

Please sign in to comment.