From 26e556b8c83700ddd6c63815a9309d77c7451871 Mon Sep 17 00:00:00 2001 From: Artem Gurevich Date: Fri, 5 Mar 2021 10:07:37 +0000 Subject: [PATCH] Fixed NPE in jit_init_hook --- doorstop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doorstop.c b/doorstop.c index d0c6389..0244219 100755 --- a/doorstop.c +++ b/doorstop.c @@ -91,7 +91,7 @@ void doorstop_init_mono_functions(void *handle) void *jit_init_hook(const char *root_domain_name, const char *runtime_version) { char *override = getenv("DOORSTOP_CORLIB_OVERRIDE_PATH"); - DIR *override_dir = opendir(override); + DIR *override_dir = override ? opendir(override) : NULL; char *assembly_dir = r_mono_assembly_getrootdir(); if (override && override_dir) { closedir(override_dir);